Enum Class LocationPrecision

java.lang.Object
java.lang.Enum<LocationPrecision>
net.solarnetwork.central.domain.LocationPrecision
All Implemented Interfaces:
Serializable, Comparable<LocationPrecision>, Constable

public enum LocationPrecision extends Enum<LocationPrecision>
Enumeration of locatioin precision levels.
  • Enum Constant Details

  • Method Details

    • values

      public static LocationPrecision[] 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

      public static LocationPrecision valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • comparePrecision

      public int comparePrecision(LocationPrecision other)
      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

      public Integer 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.