Enum Class Range.Type

java.lang.Object
java.lang.Enum<Range.Type>
net.flectone.pulse.model.value.Range.Type
All Implemented Interfaces:
Serializable, Comparable<Range.Type>, Constable
Enclosing class:
Range

public static enum Range.Type extends Enum<Range.Type>
The named scopes a range can take. Every scope except BLOCKS carries a fixed marker value.
  • Enum Constant Details

  • Method Details

    • values

      public static Range.Type[] 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 Range.Type 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
    • fromInt

      public static Range.Type fromInt(Integer integer)
      Maps a marker value back to its scope, falling back to BLOCKS for a plain radius.
      Parameters:
      integer - the raw value
      Returns:
      the matching scope
    • fromString

      public static Range.Type fromString(String string)
      Maps a scope name back to its constant, ignoring case.
      Parameters:
      string - the scope name
      Returns:
      the matching scope
      Throws:
      IllegalArgumentException - if the name is not a known scope