Class Section

com.yandex.mapkit.transport.masstransit

java.lang.Object ⇽ Section

public class Section

Contains information about an individual section of a mass transit Route.

The only fields that are always set are Section#metadata.SectionMetadata#weight, Section#geometry and Section#metadata.SectionMetadata#data.

Constructors

Section()

Use constructor with parameters in your code.

Section(@NonNull SectionMetadata metadata, @NonNull Subpolyline geometry, @NonNull List< RouteStop > stops, @NonNull List< Subpolyline > rideLegs)

Methods

synchronized Subpolyline getGeometry()

Geometry of the section as a fragment of a Route polyline.

synchronized SectionMetadata getMetadata()

General information about a section of a route.

String getNativeName()
synchronized List< Subpolyline > getRideLegs()

Vector of polylines each connecting two consecutive stops.

synchronized List< RouteStop > getStops()

Vector of stops along the route.

void serialize(Archive archive)

Constructor Detail

Section

public Section ()

Use constructor with parameters in your code.

This one is for serialization only!

Section

public Section (@NonNull SectionMetadata metadata, @NonNull Subpolyline geometry, @NonNull List< RouteStop > stops, @NonNull List< Subpolyline > rideLegs)

Method Detail

getGeometry

public synchronized Subpolyline getGeometry ()

Geometry of the section as a fragment of a Route polyline.

getMetadata

public synchronized SectionMetadata getMetadata ()

General information about a section of a route.

getNativeName

public static String getNativeName ()

getRideLegs

public synchronized List< Subpolyline > getRideLegs ()

Vector of polylines each connecting two consecutive stops.

This vector is only filled for mass transit ride sections, so this geometry represents a part of the mass transit thread geometry between two stops.

getStops

public synchronized List< RouteStop > getStops ()

Vector of stops along the route.

The first stop in the vector is the stop for boarding the transport, and the last stop in the vector is the stop for exiting the transport.

serialize

public void serialize (Archive archive)