Class IntegerRange

Object
IntegerRange

public class IntegerRange extends Object
  • Constructor Details

    • IntegerRange

      public IntegerRange(int maxNumber)
    • IntegerRange

      public IntegerRange(int minNumber, int maxNumber)
  • Method Details

    • index

      public int index(int value)
      Maps an original integer to it's index from (0..size]

      Note that no error-checking occurs to ensure value is within range.

      Parameters:
      value - within range
      Returns:
      the index of the value in the range
    • getSize

      public int getSize()