Class IntegerRange

java.lang.Object
com.dlsc.gemsfx.util.IntegerRange

public class IntegerRange extends Object
Represents an inclusive range of integers. This record defines a start and end point for the range, both inclusive.
  • Constructor Summary

    Constructors
    Constructor
    Description
    IntegerRange(int toInclusive)
    Constructs an IntegerRange with one endpoint specified by the given number and the other endpoint set to 0.
    IntegerRange(int fromInclusive, int toInclusive)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Retrieves the maximum value in the range.
    int
    Retrieves the minimum value in the range.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • IntegerRange

      public IntegerRange(int fromInclusive, int toInclusive)
    • IntegerRange

      public IntegerRange(int toInclusive)
      Constructs an IntegerRange with one endpoint specified by the given number and the other endpoint set to 0.
  • Method Details

    • getMax

      public int getMax()
      Retrieves the maximum value in the range.
      Returns:
      The larger of the two numbers defining the range.
    • getMin

      public int getMin()
      Retrieves the minimum value in the range.
      Returns:
      The smaller of the two numbers defining the range.