Interface Range


public interface Range
Range of integer values between two values in which the range includes the start value but excludes the end value.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    contains(int index)
     
    int
     
    static Range
    range(int startIndexInclusive, int endIndexExclusive)
    Create a range object from two indices.
    int
     
  • Method Details

    • startIndexInclusive

      int startIndexInclusive()
      Returns:
      the inclusive start index
    • endIndexExclusive

      int endIndexExclusive()
      Returns:
      the exclusive end index
    • contains

      boolean contains(int index)
      Parameters:
      index - The index to test.
      Returns:
      True if the index is in the range.
    • range

      static Range range(int startIndexInclusive, int endIndexExclusive)
      Create a range object from two indices.
      Parameters:
      startIndexInclusive - The start index of the range inclusive of this value.
      endIndexExclusive - The end index of the range exclusive of this value.
      Returns:
      The range.