Package com.google.maps.routing.v2
Enum RoutingPreference
- java.lang.Object
-
- java.lang.Enum<RoutingPreference>
-
- com.google.maps.routing.v2.RoutingPreference
-
- All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite,com.google.protobuf.ProtocolMessageEnum,Serializable,Comparable<RoutingPreference>
public enum RoutingPreference extends Enum<RoutingPreference> implements com.google.protobuf.ProtocolMessageEnum
A set of values that specify factors to take into consideration when calculating the route.
Protobuf enumgoogle.maps.routing.v2.RoutingPreference
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ROUTING_PREFERENCE_UNSPECIFIEDNo routing preference specified.TRAFFIC_AWARECalculates routes taking live traffic conditions into consideration.TRAFFIC_AWARE_OPTIMALCalculates the routes taking live traffic conditions into consideration, without applying most performance optimizations.TRAFFIC_UNAWAREComputes routes without taking live traffic conditions into consideration.UNRECOGNIZED
-
Field Summary
Fields Modifier and Type Field Description static intROUTING_PREFERENCE_UNSPECIFIED_VALUENo routing preference specified.static intTRAFFIC_AWARE_OPTIMAL_VALUECalculates the routes taking live traffic conditions into consideration, without applying most performance optimizations.static intTRAFFIC_AWARE_VALUECalculates routes taking live traffic conditions into consideration.static intTRAFFIC_UNAWARE_VALUEComputes routes without taking live traffic conditions into consideration.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static RoutingPreferenceforNumber(int value)static com.google.protobuf.Descriptors.EnumDescriptorgetDescriptor()com.google.protobuf.Descriptors.EnumDescriptorgetDescriptorForType()intgetNumber()com.google.protobuf.Descriptors.EnumValueDescriptorgetValueDescriptor()static com.google.protobuf.Internal.EnumLiteMap<RoutingPreference>internalGetValueMap()static RoutingPreferencevalueOf(int value)Deprecated.static RoutingPreferencevalueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)Returns the enum constant of this type with the specified name.static RoutingPreferencevalueOf(String name)Returns the enum constant of this type with the specified name.static RoutingPreference[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ROUTING_PREFERENCE_UNSPECIFIED
public static final RoutingPreference ROUTING_PREFERENCE_UNSPECIFIED
No routing preference specified. Default to `TRAFFIC_UNAWARE`.
ROUTING_PREFERENCE_UNSPECIFIED = 0;
-
TRAFFIC_UNAWARE
public static final RoutingPreference TRAFFIC_UNAWARE
Computes routes without taking live traffic conditions into consideration. Suitable when traffic conditions don't matter or are not applicable. Using this value produces the lowest latency. Note: For [RouteTravelMode][google.maps.routing.v2.RouteTravelMode] `DRIVE` and `TWO_WHEELER` choice of route and duration are based on road network and average time-independent traffic conditions. Results for a given request may vary over time due to changes in the road network, updated average traffic conditions, and the distributed nature of the service. Results may also vary between nearly-equivalent routes at any time or frequency.
TRAFFIC_UNAWARE = 1;
-
TRAFFIC_AWARE
public static final RoutingPreference TRAFFIC_AWARE
Calculates routes taking live traffic conditions into consideration. In contrast to `TRAFFIC_AWARE_OPTIMAL`, some optimizations are applied to significantly reduce latency.
TRAFFIC_AWARE = 2;
-
TRAFFIC_AWARE_OPTIMAL
public static final RoutingPreference TRAFFIC_AWARE_OPTIMAL
Calculates the routes taking live traffic conditions into consideration, without applying most performance optimizations. Using this value produces the highest latency.
TRAFFIC_AWARE_OPTIMAL = 3;
-
UNRECOGNIZED
public static final RoutingPreference UNRECOGNIZED
-
-
Field Detail
-
ROUTING_PREFERENCE_UNSPECIFIED_VALUE
public static final int ROUTING_PREFERENCE_UNSPECIFIED_VALUE
No routing preference specified. Default to `TRAFFIC_UNAWARE`.
ROUTING_PREFERENCE_UNSPECIFIED = 0;- See Also:
- Constant Field Values
-
TRAFFIC_UNAWARE_VALUE
public static final int TRAFFIC_UNAWARE_VALUE
Computes routes without taking live traffic conditions into consideration. Suitable when traffic conditions don't matter or are not applicable. Using this value produces the lowest latency. Note: For [RouteTravelMode][google.maps.routing.v2.RouteTravelMode] `DRIVE` and `TWO_WHEELER` choice of route and duration are based on road network and average time-independent traffic conditions. Results for a given request may vary over time due to changes in the road network, updated average traffic conditions, and the distributed nature of the service. Results may also vary between nearly-equivalent routes at any time or frequency.
TRAFFIC_UNAWARE = 1;- See Also:
- Constant Field Values
-
TRAFFIC_AWARE_VALUE
public static final int TRAFFIC_AWARE_VALUE
Calculates routes taking live traffic conditions into consideration. In contrast to `TRAFFIC_AWARE_OPTIMAL`, some optimizations are applied to significantly reduce latency.
TRAFFIC_AWARE = 2;- See Also:
- Constant Field Values
-
TRAFFIC_AWARE_OPTIMAL_VALUE
public static final int TRAFFIC_AWARE_OPTIMAL_VALUE
Calculates the routes taking live traffic conditions into consideration, without applying most performance optimizations. Using this value produces the highest latency.
TRAFFIC_AWARE_OPTIMAL = 3;- See Also:
- Constant Field Values
-
-
Method Detail
-
values
public static RoutingPreference[] 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 (RoutingPreference c : RoutingPreference.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static RoutingPreference valueOf(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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getNumber
public final int getNumber()
- Specified by:
getNumberin interfacecom.google.protobuf.Internal.EnumLite- Specified by:
getNumberin interfacecom.google.protobuf.ProtocolMessageEnum
-
valueOf
@Deprecated public static RoutingPreference valueOf(int value)
Deprecated.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:
value- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
forNumber
public static RoutingPreference forNumber(int value)
- Parameters:
value- The numeric wire value of the corresponding enum entry.- Returns:
- The enum associated with the given numeric wire value.
-
internalGetValueMap
public static com.google.protobuf.Internal.EnumLiteMap<RoutingPreference> internalGetValueMap()
-
getValueDescriptor
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
- Specified by:
getValueDescriptorin interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptorForType
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptor
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
-
valueOf
public static RoutingPreference valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
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:
desc- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
-