OptimizationMode (API Reference)
Enum Class OptimizationMode
- All Implemented Interfaces:
Serializable,Comparable<OptimizationMode>,Constable
Identifiers for different optimizations that can be used during the route calculation while trying to keep the quality of the route being calculated high. The route is considered to be of low quality if it gives the traveler an unpleasant experience, such as having difficult turns or having a lot of turns in general. For example, if there are two possible routes from A to B, one with a length of 1000m and 10 turns, and another with a length of 1050m and only one turn, the second one will be returned as the shortest, although it is 50m longer. Yet, it contains only one turn and it is therefore considered to provide a better traveler experience.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic OptimizationModeReturns the enum constant of this class with the specified name.static OptimizationMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FASTEST
The routing algorithm will attempt to find the fastest route possible, i.e. to optimize travel time while at the same time keeping the quality of the route high. For example, the algorithm may favor a route that remains on a highway, even if a shorter route can be achieved by taking a shortcut through side roads.
-
SHORTEST
The routing algorithm will attempt to find the shortest route possible, i.e. to optimize the length of the route while at the same time keeping the quality of the route high. For example, the algorithm may favor taking a shortcut that ignores speed information, even if a faster route can be achieved by staying on the highway.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-