Package net.solarnetwork.central.domain
Enum Class LocationPrecision
- All Implemented Interfaces:
Serializable,Comparable<LocationPrecision>,Constable
Enumeration of locatioin precision levels.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionintCompare the precision of this to another.Get a relative precision value for this enum.static LocationPrecisionReturns the enum constant of this class with the specified name.static LocationPrecision[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
LatLong
-
Block
-
Street
-
PostalCode
-
Locality
-
StateOrProvince
-
Region
-
TimeZone
-
Country
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
comparePrecision
Compare the precision of this to another.- Parameters:
other- the other- Returns:
- -1 if this precision less than other precision, 0 if precisions are equal, or 1 if this precision is greater than other precision
-
getPrecision
Get a relative precision value for this enum. The smaller the value, the more precise a location of this level represents.- Returns:
- The precision.
-