Interface IntSet.IntIterator
-
- All Superinterfaces:
Cloneable
,org.roaringbitmap.IntIterator
- All Known Implementing Classes:
BitIterator
,EmptyIntIterator
- Enclosing interface:
- IntSet
public static interface IntSet.IntIterator extends org.roaringbitmap.IntIterator
AnIterator
-like interface that allows to "skip" some elements of the set
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IntSet.IntIterator
clone()
Clone the iteratorboolean
hasNext()
int
next()
void
skipAllBefore(int element)
Skips all the elements before the specified element, so thatnext()
gives the given element or, if it does not exist, the element immediately after according to the sorting provided by this set.
-
-
-
Method Detail
-
hasNext
boolean hasNext()
- Specified by:
hasNext
in interfaceorg.roaringbitmap.IntIterator
- Returns:
- true if the iterator has more elements.
-
next
int next()
- Specified by:
next
in interfaceorg.roaringbitmap.IntIterator
- Returns:
- the next element in the iteration.
- Throws:
NoSuchElementException
- iteration has no more elements.
-
skipAllBefore
void skipAllBefore(int element)
Skips all the elements before the specified element, so thatnext()
gives the given element or, if it does not exist, the element immediately after according to the sorting provided by this set.If
element
is less than the next element, it does nothing- Parameters:
element
- first element to not skip
-
clone
IntSet.IntIterator clone()
Clone the iterator- Specified by:
clone
in interfaceorg.roaringbitmap.IntIterator
- Returns:
- a clone of the IntIterator
-
-