Class RangeSet.Iter

java.lang.Object
org.apache.sis.util.collection.RangeSet.Iter
All Implemented Interfaces:
Iterator<Range<E>>
Direct Known Subclasses:
RangeSet.SubIter
Enclosing class:
RangeSet<E extends Comparable<? super E>>

private class RangeSet.Iter extends Object implements Iterator<Range<E>>
The iterator returned by RangeSet.iterator(). All elements are Range objects.
Since:
0.3
Version:
0.3
  • Field Details

    • modCount

      int modCount
      Modification count at construction time.
    • upper

      final int upper
      Index after the last element in the RangeSet.array where to iterate.
    • position

      int position
      Current position in RangeSet.array.
    • canRemove

      boolean canRemove
      true if the remove() method can be invoked.
  • Constructor Details

    • Iter

      Iter(int upper)
      Creates a new iterator for the given portion of the RangeSet.array.
  • Method Details

    • hasNext

      public final boolean hasNext()
      Returns true if the iteration has more elements.
      Specified by:
      hasNext in interface Iterator<Range<E extends Comparable<? super E>>>
    • next

      public Range<E> next()
      Returns the next element in the iteration.
      Specified by:
      next in interface Iterator<Range<E extends Comparable<? super E>>>
    • remove

      public void remove()
      Removes from the underlying collection the last element returned by the iterator.
      Specified by:
      remove in interface Iterator<Range<E extends Comparable<? super E>>>