Class IntRangeEnumerator

All Implemented Interfaces:
Spliterator<Integer>, Spliterator.OfInt, Spliterator.OfPrimitive<Integer,IntConsumer,Spliterator.OfInt>, BareEnumerator<Integer>, Enumerator<Integer>, Enumerator.OfInt

public class IntRangeEnumerator extends AbstractIntEnumerator
Enumerates integers in a given range.
  • Constructor Details

    • IntRangeEnumerator

      public IntRangeEnumerator(int endExclusive)
      Enumerates from 0 to endExclusive.
      Parameters:
      endExclusive - the end of the range + 1
    • IntRangeEnumerator

      public IntRangeEnumerator(int startInclusive, int endExclusive)
      Enumerates from startInclusive to endExclusive.
      Parameters:
      startInclusive - the start of the range
      endExclusive - the end of the range + 1
    • IntRangeEnumerator

      public IntRangeEnumerator(IntToIntFunction f, int startInclusive, int endExclusive)
      Enumerates from startInclusive to endExclusive.
      Parameters:
      startInclusive - the start of the range
      endExclusive - the end of the range + 1
  • Method Details