Class SectionMetadata

com.yandex.mapkit.transport.masstransit

java.lang.Object ⇽ SectionMetadata

public class SectionMetadata

General information about a section of a route.

The SectionMetadata#data field describes the type of section: wait, walk, transfer, or transport, and related data. Related data can be set for walk and transfer sections. This data is a vector of construction types of corresponding geometry segments.

Nested Classes

Constructors

SectionMetadata()

Use constructor with parameters in your code.

SectionMetadata(@NonNull Weight weight, @NonNull SectionData data, @Nullable TravelEstimation estimation, int legIndex)

Methods

synchronized SectionData getData()

Contains information that is specific to a section type: wait, walk, transfer, or ride transport.

synchronized TravelEstimation getEstimation()

Arrival and departure time estimations.

synchronized int getLegIndex()

Part of the route polyline for the route leg.

String getNativeName()
synchronized Weight getWeight()

Contains the route traveling time, distance of the walking part, and the number of transfers.

void serialize(Archive archive)

Constructor Detail

SectionMetadata

public SectionMetadata ()

Use constructor with parameters in your code.

This one is for serialization only!

SectionMetadata

public SectionMetadata (@NonNull Weight weight, @NonNull SectionData data, @Nullable TravelEstimation estimation, int legIndex)

Method Detail

getData

public synchronized SectionData getData ()

Contains information that is specific to a section type: wait, walk, transfer, or ride transport.

getEstimation

public synchronized TravelEstimation getEstimation ()

Arrival and departure time estimations.

This field is set only for time-dependent routes.Optional field, can be null.

getLegIndex

public synchronized int getLegIndex ()

Part of the route polyline for the route leg.

A leg is a part of the route between two consecutive waypoints.

getNativeName

public static String getNativeName ()

getWeight

public synchronized Weight getWeight ()

Contains the route traveling time, distance of the walking part, and the number of transfers.

serialize

public void serialize (Archive archive)