Package org.agrona.collections
Class Int2ObjectCache.AbstractIterator<T>
- java.lang.Object
-
- org.agrona.collections.Int2ObjectCache.AbstractIterator<T>
-
- Type Parameters:
T
- type of elements.
- All Implemented Interfaces:
java.util.Iterator<T>
- Direct Known Subclasses:
Int2ObjectCache.EntryIterator
,Int2ObjectCache.KeyIterator
,Int2ObjectCache.ValueIterator
- Enclosing class:
- Int2ObjectCache<V>
abstract class Int2ObjectCache.AbstractIterator<T> extends java.lang.Object implements java.util.Iterator<T>
Base iterator implementation that contains basic logic of traversing the element in the backing array.
-
-
Constructor Summary
Constructors Constructor Description AbstractIterator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
findNext()
Find next element.boolean
hasNext()
abstract T
next()
protected int
position()
Position of the current element.void
remove()
(package private) void
reset()
-
-
-
Method Detail
-
position
protected final int position()
Position of the current element.- Returns:
- position of the current element.
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<T>
-
findNext
protected final void findNext()
Find next element.
-
remove
public void remove()
- Specified by:
remove
in interfacejava.util.Iterator<T>
-
reset
void reset()
-
-