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_UNSPECIFIED
No routing preference specified.TRAFFIC_AWARE
Calculates routes taking live traffic conditions into consideration.TRAFFIC_AWARE_OPTIMAL
Calculates the routes taking live traffic conditions into consideration, without applying most performance optimizations.TRAFFIC_UNAWARE
Computes routes without taking live traffic conditions into consideration.UNRECOGNIZED
-
Field Summary
Fields Modifier and Type Field Description static int
ROUTING_PREFERENCE_UNSPECIFIED_VALUE
No routing preference specified.static int
TRAFFIC_AWARE_OPTIMAL_VALUE
Calculates the routes taking live traffic conditions into consideration, without applying most performance optimizations.static int
TRAFFIC_AWARE_VALUE
Calculates routes taking live traffic conditions into consideration.static int
TRAFFIC_UNAWARE_VALUE
Computes 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 RoutingPreference
forNumber(int value)
static com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor()
com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType()
int
getNumber()
com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor()
static com.google.protobuf.Internal.EnumLiteMap<RoutingPreference>
internalGetValueMap()
static RoutingPreference
valueOf(int value)
Deprecated.static RoutingPreference
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
Returns the enum constant of this type with the specified name.static RoutingPreference
valueOf(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:
getNumber
in interfacecom.google.protobuf.Internal.EnumLite
- Specified by:
getNumber
in 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:
getValueDescriptor
in interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptorForType
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in 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
-
-