Package org.roaringbitmap
Class ReverseIntIteratorFlyweight
java.lang.Object
org.roaringbitmap.ReverseIntIteratorFlyweight
- All Implemented Interfaces:
Cloneable,IntIterator
Fast iterator minimizing the stress on the garbage collector. You can create one reusable
instance of this class and then
wrap(RoaringBitmap)
This iterator enumerates the stored values in reverse (starting from the end).-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance that is not ready for iteration.Creates an instance that is ready for iteration. -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates a copy of the iterator.booleanhasNext()intnext()voidwrap(RoaringBitmap r)Prepares a bitmap for iteration
-
Constructor Details
-
ReverseIntIteratorFlyweight
public ReverseIntIteratorFlyweight()Creates an instance that is not ready for iteration. You must first callwrap(RoaringBitmap). -
ReverseIntIteratorFlyweight
Creates an instance that is ready for iteration.- Parameters:
r- bitmap to be iterated over
-
-
Method Details
-
clone
Description copied from interface:IntIteratorCreates a copy of the iterator.- Specified by:
clonein interfaceIntIterator- Overrides:
clonein classObject- Returns:
- a clone of the current iterator
-
hasNext
public boolean hasNext()- Specified by:
hasNextin interfaceIntIterator- Returns:
- whether there is another value
-
next
public int next()- Specified by:
nextin interfaceIntIterator- Returns:
- next integer value
-
wrap
Prepares a bitmap for iteration- Parameters:
r- bitmap to be iterated over
-