Package org.apache.sis.util.collection
Class RangeSet.Iter
java.lang.Object
org.apache.sis.util.collection.RangeSet.Iter
- Direct Known Subclasses:
RangeSet.SubIter
- Enclosing class:
- RangeSet<E extends Comparable<? super E>>
The iterator returned by
RangeSet.iterator()
.
All elements are Range
objects.- Since:
- 0.3
- Version:
- 0.3
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) boolean
true
if theremove()
method can be invoked.(package private) int
Modification count at construction time.(package private) int
Current position inRangeSet.array
.(package private) final int
Index after the last element in theRangeSet.array
where to iterate. -
Constructor Summary
ConstructorsConstructorDescriptionIter
(int upper) Creates a new iterator for the given portion of theRangeSet.array
. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
modCount
int modCountModification count at construction time. -
upper
final int upperIndex after the last element in theRangeSet.array
where to iterate. -
position
int positionCurrent position inRangeSet.array
. -
canRemove
boolean canRemovetrue
if theremove()
method can be invoked.
-
-
Constructor Details
-
Iter
Iter(int upper) Creates a new iterator for the given portion of theRangeSet.array
.
-
-
Method Details
-
hasNext
public final boolean hasNext()Returnstrue
if the iteration has more elements. -
next
Returns the next element in the iteration. -
remove
public void remove()Removes from the underlying collection the last element returned by the iterator.
-