Interface Range<T extends Number>

Type Parameters:
T - The type numeric of the range object.
All Known Implementing Classes:
Range.Byte, Range.Double, Range.Float, Range.Integer, Range.Long, Range.Short

public sealed interface Range<T extends Number> permits Range.Byte, Range.Short, Range.Integer, Range.Long, Range.Float, Range.Double
Represents the base for any data type that is numeric.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
     
    static final record 
     
    static final record 
     
    static final record 
     
    static final record 
     
    static final record 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isInRange(T value)
    Whether the given value is in range of the minimum and the maximum.
  • Method Details

    • isInRange

      boolean isInRange(@NotNull T value)
      Whether the given value is in range of the minimum and the maximum.
      Parameters:
      value - The value to be checked.
      Returns:
      true if the value in the range of minimum and maximum, otherwise false.