Enum TrafficOptimizationMode
Enum TrafficOptimizationMode
- java.lang.Object
-
- java.lang.Enum<TrafficOptimizationMode>
-
- com.here.sdk.routing.TrafficOptimizationMode
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<TrafficOptimizationMode>
public enum TrafficOptimizationMode extends java.lang.Enum<TrafficOptimizationMode>
Traffic optimization mode that defines whether and what kind of traffic information should be considered during route calculation.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DISABLEDTraffic optimization is completely disabled, including long-term road closures.LONG_TERM_CLOSURES_ONLYOnly long-term road closures are taken into account.TIME_DEPENDENTTraffic optimization is enabled, the shape of the route will be adjusted according to the traffic situation that depends on theRouteOptions.departureTimeorRouteOptions.arrivalTime.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TrafficOptimizationModevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static TrafficOptimizationMode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
TIME_DEPENDENT
public static final TrafficOptimizationMode TIME_DEPENDENT
Traffic optimization is enabled, the shape of the route will be adjusted according to the traffic situation that depends on the
RouteOptions.departureTimeorRouteOptions.arrivalTime. As a result, streets with heavy traffic will be avoided whenever possible. Note that this mode enables traffic-aware routing.
-
LONG_TERM_CLOSURES_ONLY
public static final TrafficOptimizationMode LONG_TERM_CLOSURES_ONLY
Only long-term road closures are taken into account. Both
RouteOptions.departureTimeandRouteOptions.arrivalTimeare ignored, and the route will be shaped disregarding all the available current and historical traffic information, except long-term road closures. Note that this mode disables traffic-aware routing regardless of other settings.
-
DISABLED
public static final TrafficOptimizationMode DISABLED
Traffic optimization is completely disabled, including long-term road closures. Both
RouteOptions.departureTimeandRouteOptions.arrivalTimeare ignored, and the route will be shaped disregarding all the available current and historical traffic information. Note that seasonal closures are not excluded. To exclude seasonal closures, useRoadFeatures.SEASONAL_CLOSURE. Note that this mode disables traffic-aware routing regardless of other settings.
-
-
Method Detail
-
values
public static TrafficOptimizationMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TrafficOptimizationMode c : TrafficOptimizationMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TrafficOptimizationMode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
-