Enum OptimizationMode
Enum OptimizationMode
- java.lang.Object
-
- java.lang.Enum<OptimizationMode>
-
- com.here.sdk.routing.OptimizationMode
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<OptimizationMode>
public enum OptimizationMode extends java.lang.Enum<OptimizationMode>
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.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static OptimizationModevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static OptimizationMode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
FASTEST
public static final OptimizationMode 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
public static final OptimizationMode 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 Detail
-
values
public static OptimizationMode[] 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 (OptimizationMode c : OptimizationMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static OptimizationMode 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
-
-