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 Object
implements IntListIterator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intalways keep at valid positionprivate final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanhasNext()Check if there is a next element.booleanCheck if there is a previous element.voidMove the iterator to the end of the underlying index.voidMove the iterator to the start of the underlying index.final intnext()Return the next int in the list and increment the iterator.final intnextNvc()version of next() which bypasses the validity check.intprevious()Return the previous int and decrement the iterator.intversion of previous that bypasses the validity check.
-
Field Details
-
curPosition
private int curPositionalways keep at valid position -
firstPosition
private final int firstPosition
-
-
Constructor Details
-
Obj2IntIdentityHashMapIterator
private Obj2IntIdentityHashMapIterator()
-
-
Method Details
-
hasNext
public final boolean hasNext()Description copied from interface:IntListIteratorCheck if there is a next element. Does not move the iterator.- Specified by:
hasNextin interfaceIntListIterator- Returns:
trueiff there is a next element.
-
next
public final int next()Description copied from interface:IntListIteratorReturn the next int in the list and increment the iterator.- Specified by:
nextin interfaceIntListIterator- Returns:
- The next int.
-
nextNvc
public final int nextNvc()Description copied from interface:IntListIteratorversion of next() which bypasses the validity check. Only use this if you've already done this check yourself.- Specified by:
nextNvcin interfaceIntListIterator- Returns:
- the next int in the list and increment the iterator.
-
hasPrevious
public boolean hasPrevious()Description copied from interface:IntListIteratorCheck if there is a previous element. Does not move the iterator.- Specified by:
hasPreviousin interfaceIntListIterator- Returns:
trueiff there is a previous element.
-
previous
public int previous()Description copied from interface:IntListIteratorReturn the previous int and decrement the iterator.- Specified by:
previousin interfaceIntListIterator- Returns:
- the previous int (found by first moving the iterator one backwards).
-
previousNvc
public int previousNvc()Description copied from interface:IntListIteratorversion of previous that bypasses the validity check. Only use this if you've already done this check yourself.- Specified by:
previousNvcin interfaceIntListIterator- Returns:
- the previous int (found by first moving the iterator one backwards).
-
moveToStart
public void moveToStart()Description copied from interface:IntListIteratorMove the iterator to the start of the underlying index.- Specified by:
moveToStartin interfaceIntListIterator
-
moveToEnd
public void moveToEnd()Description copied from interface:IntListIteratorMove the iterator to the end of the underlying index.- Specified by:
moveToEndin interfaceIntListIterator
-