Class TransitRouteOptions
Class TransitRouteOptions
- java.lang.Object
-
- com.here.sdk.routing.TransitRouteOptions
-
public final class TransitRouteOptions extends java.lang.ObjectAll the options to specify how a public transit route should be calculated.
-
-
Field Summary
Fields Modifier and Type Field Description intalternativesNumber of alternative routes to return aside from the optimal route.java.util.DatearrivalTimeOptional time when travel is expected to end.java.lang.IntegerchangesMaximum number of changes or transfers allowed in a route.java.util.DatedepartureTimeOptional time when travel is expected to start.TransitModeFiltermodeFilterDefines inclusion or exclusion of transit modes for route calculation.java.util.List<TransitMode>modesThis list is used to determine which transit modes should be used for route calculation,modeFilterspecifies whether this list is an inclusion or an exclusion.intpedestrianMaxDistanceInMetersMaximum allowed walking distance in meters (e.g.doublepedestrianSpeedInMetersPerSecondWalking speed in meters per second.RouteTextOptionstextOptionsCustomize textual content returned from the route calculation, such as localization, format, and unit system.
-
Constructor Summary
Constructors Constructor Description TransitRouteOptions()Creates a new instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)static TransitRouteOptionsfromDefaultParameterConfiguration()Returns TransitRouteOptions instance with default values used in SDK.inthashCode()
-
-
-
Field Detail
-
departureTime
@Nullable public java.util.Date departureTime
Optional time when travel is expected to start. If it is not specified, it is set to the current time.
-
arrivalTime
@Nullable public java.util.Date arrivalTime
Optional time when travel is expected to end.
-
alternatives
public int alternatives
Number of alternative routes to return aside from the optimal route. The provided value must be in the range [0, 6]. By default, it is 0 and only one route is calculated.
-
changes
@Nullable public java.lang.Integer changes
Maximum number of changes or transfers allowed in a route. When it is not set, unlimited number of changes is permitted. The provided value must be in the range [0, 6].
-
modeFilter
@NonNull public TransitModeFilter modeFilter
Defines inclusion or exclusion of transit modes for route calculation. By default, the inclusion mode is used.
-
modes
@NonNull public java.util.List<TransitMode> modes
This list is used to determine which transit modes should be used for route calculation,
modeFilterspecifies whether this list is an inclusion or an exclusion. For example, specifying subway and bus transit modes with the include filter, returns only subway and bus transit modes, and with the exclude filter, returns all the transit modes except subway and bus. When not set, all the supported transit modes are permitted. By default, this list is empty.
-
pedestrianSpeedInMetersPerSecond
public double pedestrianSpeedInMetersPerSecond
Walking speed in meters per second. Influences the duration of walking segments from origin to a station, from a station to destination and in-between the stations (e.g. if transfer is needed). The provided value must be in the range [0.5, 2.0]. The default value is 1.0 mps.
-
pedestrianMaxDistanceInMeters
public int pedestrianMaxDistanceInMeters
Maximum allowed walking distance in meters (e.g. when looking for nearest stations). The provided value must be in the range [0, 6000]. The default value is 2000 meters.
-
textOptions
@NonNull public RouteTextOptions textOptions
Customize textual content returned from the route calculation, such as localization, format, and unit system.
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
fromDefaultParameterConfiguration
@NonNull public static TransitRouteOptions fromDefaultParameterConfiguration()
Returns TransitRouteOptions instance with default values used in SDK.
- Returns:
An
TransitRouteOptionsinstance with default values used in SDK.
-
-