Class RangeSet.SubIter
java.lang.Object
RangeSet<E>.org.apache.sis.util.collection.RangeSet.Iter
org.apache.sis.util.collection.RangeSet.SubIter
- Enclosing class:
RangeSet<E extends Comparable<? super E>>
The iterator returned by
RangeSet.SubSet.iterator(). This iterator is similar
to the one returned by RangeSet.iterator(), except that:
- The iteration is restricted to a sub-region of the
RangeSet.array. - The first and last ranges returned by the iterator are intercepted with the range of the subset (other ranges should not need to be intercepted).
- The range removed by
remove()is intercepted with the range of the subset.
- Since:
- 0.3
- Version:
- 0.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intIndex of the first element in theRangeSet.arraywhere to iterate.A copy of theRangeSet.SubSet.subRangefield value at the time of iterator creation.Fields inherited from class RangeSet.Iter
canRemove, modCount, position, upper -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class RangeSet.Iter
hasNextMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterator
forEachRemaining
-
Field Details
-
subRange
A copy of theRangeSet.SubSet.subRangefield value at the time of iterator creation. -
lower
private final int lowerIndex of the first element in theRangeSet.arraywhere to iterate.
-
-
Constructor Details
-
SubIter
Creates a new iterator for the given portion of theRangeSet.array.
-
-
Method Details
-
isFirstOrLast
private boolean isFirstOrLast()Returnstrueif the iterator position is at the first or at the last range. This method is accurate only when invoked aftersuper.next(). -
next
-
remove
-