Follow us on GitHub

com.google.gwt.maps.client.services
Enum UnitSystem

java.lang.Object
  extended by java.lang.Enum<UnitSystem>
      extended by com.google.gwt.maps.client.services.UnitSystem
All Implemented Interfaces:
Serializable, Comparable<UnitSystem>

public enum UnitSystem
extends Enum<UnitSystem>

The valid unit systems that can be specified in a DirectionsRequest.

See UnitSystem API Doc


Enum Constant Summary
IMPERIAL
          Specifies that distances in the DirectionsResult should be expressed in imperial units.
METRIC
          Specifies that distances in the DirectionsResult should be expressed in metric units.
 
Method Summary
static UnitSystem fromValue(int type)
           
 String toString()
           
 int value()
           
static UnitSystem valueOf(String name)
          Returns the enum constant of this type with the specified name.
static UnitSystem[] 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, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

IMPERIAL

public static final UnitSystem IMPERIAL
Specifies that distances in the DirectionsResult should be expressed in imperial units.


METRIC

public static final UnitSystem METRIC
Specifies that distances in the DirectionsResult should be expressed in metric units.

Method Detail

values

public static UnitSystem[] 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 (UnitSystem c : UnitSystem.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static UnitSystem 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 name
NullPointerException - if the argument is null

value

public int value()

fromValue

public static UnitSystem fromValue(int type)

toString

public String toString()
Overrides:
toString in class Enum<UnitSystem>


Follow us on GitHub

Copyright © 2011-2012 Gone Vertical LLC. All Rights Reserved.