Class TransitRouteOptions

java.lang.Object
com.here.sdk.routing.TransitRouteOptions

public final class TransitRouteOptions extends Object

All the options to specify how a public transit route should be calculated.

  • Field Details

    • departureTime

      @Nullable public 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 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 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 List<TransitMode> modes

      This list is used to determine which transit modes should be used for route calculation, modeFilter specifies 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.

  • Constructor Details

    • TransitRouteOptions

      public TransitRouteOptions()

      Creates a new instance.

  • Method Details

    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • fromDefaultParameterConfiguration

      @NonNull public static TransitRouteOptions fromDefaultParameterConfiguration()

      Returns TransitRouteOptions instance with default values used in SDK.

      Returns:

      An TransitRouteOptions instance with default values used in SDK.