RouteSegment

sealed interface RouteSegment

A single contiguous part of the route.

The full journey is represented as an ordered list of RouteSegment items. Each item describes one movement phase between two points in the route.

Typical sequence: Walking ->PublicTransport ->PublicTransport ->Walking

Inheritors

Types

Link copied to clipboard
data class PublicTransport(val transports: List<TransportInfo>, val startPointName: String, val intermediateStops: List<String>, val finishPointName: String) : RouteSegment

Public transport ride segment.

Link copied to clipboard
data class Walking(val duration: Duration, val distanceInMeters: Int) : RouteSegment

Walking segment between two route points.