Class Range<N extends Number>

java.lang.Object
java.lang.Number
studio.mevera.imperat.selector.field.Range<N>
All Implemented Interfaces:
Serializable

public final class Range<N extends Number> extends Number
See Also:
  • Method Details

    • atLeast

      public static <N extends Number> Range<N> atLeast(N numericValue)
    • atMost

      public static <N extends Number> Range<N> atMost(N numericValue)
    • of

      public static <N extends Number> Range<N> of(@Nullable N min, @Nullable N max)
    • getMax

      @Nullable public N getMax()
    • getMin

      @Nullable public N getMin()
    • isInRange

      public boolean isInRange(N value)
    • intValue

      public int intValue()
      Returns the value of the specified number as an int.
      Specified by:
      intValue in class Number
      Returns:
      the numeric value represented by this object after conversion to type int.
    • longValue

      public long longValue()
      Returns the value of the specified number as a long.
      Specified by:
      longValue in class Number
      Returns:
      the numeric value represented by this object after conversion to type long.
    • floatValue

      public float floatValue()
      Returns the value of the specified number as a float.
      Specified by:
      floatValue in class Number
      Returns:
      the numeric value represented by this object after conversion to type float.
    • doubleValue

      public double doubleValue()
      Returns the value of the specified number as a double.
      Specified by:
      doubleValue in class Number
      Returns:
      the numeric value represented by this object after conversion to type double.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object