Package org.apache.uima.internal.util
Class Obj2IntIdentityHashMap.Obj2IntIdentityHashMapIterator
- java.lang.Object
-
- org.apache.uima.internal.util.Obj2IntIdentityHashMap.Obj2IntIdentityHashMapIterator
-
- All Implemented Interfaces:
IntListIterator
- Enclosing class:
- Obj2IntIdentityHashMap<T>
private class Obj2IntIdentityHashMap.Obj2IntIdentityHashMapIterator extends java.lang.Object implements IntListIterator
-
-
Field Summary
Fields Modifier and Type Field Description private int
curPosition
always keep at valid positionprivate int
firstPosition
-
Constructor Summary
Constructors Modifier Constructor Description private
Obj2IntIdentityHashMapIterator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
Check if there is a next element.boolean
hasPrevious()
Check if there is a previous element.void
moveToEnd()
Move the iterator to the end of the underlying index.void
moveToStart()
Move the iterator to the start of the underlying index.int
next()
Return the next int in the list and increment the iterator.int
nextNvc()
version of next() which bypasses the validity check.int
previous()
Return the previous int and decrement the iterator.int
previousNvc()
version of previous that bypasses the validity check.
-
-
-
Method Detail
-
hasNext
public final boolean hasNext()
Description copied from interface:IntListIterator
Check if there is a next element. Does not move the iterator.- Specified by:
hasNext
in interfaceIntListIterator
- Returns:
true
iff there is a next element.
-
next
public final int next()
Description copied from interface:IntListIterator
Return the next int in the list and increment the iterator.- Specified by:
next
in interfaceIntListIterator
- Returns:
- The next int.
-
nextNvc
public final int nextNvc()
Description copied from interface:IntListIterator
version of next() which bypasses the validity check. Only use this if you've already done this check yourself.- Specified by:
nextNvc
in interfaceIntListIterator
- Returns:
- the next int in the list and increment the iterator.
-
hasPrevious
public boolean hasPrevious()
Description copied from interface:IntListIterator
Check if there is a previous element. Does not move the iterator.- Specified by:
hasPrevious
in interfaceIntListIterator
- Returns:
true
iff there is a previous element.
-
previous
public int previous()
Description copied from interface:IntListIterator
Return the previous int and decrement the iterator.- Specified by:
previous
in interfaceIntListIterator
- Returns:
- the previous int (found by first moving the iterator one backwards).
-
previousNvc
public int previousNvc()
Description copied from interface:IntListIterator
version of previous that bypasses the validity check. Only use this if you've already done this check yourself.- Specified by:
previousNvc
in interfaceIntListIterator
- Returns:
- the previous int (found by first moving the iterator one backwards).
-
moveToStart
public void moveToStart()
Description copied from interface:IntListIterator
Move the iterator to the start of the underlying index.- Specified by:
moveToStart
in interfaceIntListIterator
-
moveToEnd
public void moveToEnd()
Description copied from interface:IntListIterator
Move the iterator to the end of the underlying index.- Specified by:
moveToEnd
in interfaceIntListIterator
-
-