com.liferay.portal.kernel.search.geolocation
Enum DistanceUnit
java.lang.Object
java.lang.Enum<DistanceUnit>
com.liferay.portal.kernel.search.geolocation.DistanceUnit
- All Implemented Interfaces:
- Serializable, Comparable<DistanceUnit>
public enum DistanceUnit
- extends Enum<DistanceUnit>
CENTIMETERS
public static final DistanceUnit CENTIMETERS
FEET
public static final DistanceUnit FEET
INCHES
public static final DistanceUnit INCHES
KILOMETERS
public static final DistanceUnit KILOMETERS
METERS
public static final DistanceUnit METERS
MILES
public static final DistanceUnit MILES
MILLIMETERS
public static final DistanceUnit MILLIMETERS
YARDS
public static final DistanceUnit YARDS
values
public static DistanceUnit[] 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 (DistanceUnit c : DistanceUnit.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static DistanceUnit 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
getUnit
public String getUnit()
toString
public String toString()
- Overrides:
toString in class Enum<DistanceUnit>