Enum Class OptimizationMode

java.lang.Object
java.lang.Enum<OptimizationMode>
com.here.sdk.routing.OptimizationMode
All Implemented Interfaces:
Serializable, Comparable<OptimizationMode>, Constable

public enum OptimizationMode extends 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.

  • Enum Constant Details

    • 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 Details

    • values

      public static OptimizationMode[] 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

      public static OptimizationMode valueOf(String name)
      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 name
      NullPointerException - if the argument is null