Enum 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.

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static TrafficOptimizationMode valueOf​(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.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • 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.departureTime or RouteOptions.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.departureTime and RouteOptions.arrivalTime are 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.departureTime and RouteOptions.arrivalTime are 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, use RoadFeatures.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 name
        java.lang.NullPointerException - if the argument is null