Package org.apache.uima.cas.impl
Class FSIntIteratorImplBase<T extends FeatureStructure>
java.lang.Object
org.apache.uima.cas.impl.FSIntIteratorImplBase<T>
- All Implemented Interfaces:
Comparable<FSIntIteratorImplBase<T>>
,LowLevelIterator
,ComparableIntPointerIterator<T>
,IntPointerIterator
- Direct Known Subclasses:
IntIterator4bag
,IntIterator4set
,IntIterator4sorted
public abstract class FSIntIteratorImplBase<T extends FeatureStructure>
extends Object
implements ComparableIntPointerIterator<T>, LowLevelIterator
Base class for int Iterators over indexes.
There are 3 styles of indexes, one for Sorted, one for Sets and one for Bag.
There is a separate int iterator for each of these styles:
IntIterator4bag
IntIterator4sorted
IntArrayRBTIterator
There are also specialized int iterators:
SnapshotPointerIterator - iterates over a one-time flat snapshot
FlatIterator - iterates over a flattened array of Java Objects (not ints) - so this is
excluded from this discussion because this class is only for int iterators.
This class is the superclass of the 3 standard int iterators, and the SnapshotPointerIterator.
It is an iterator for just one UIMA type (excludes subtypes). Other wrappers handle combining
multiple of these kinds of iterators into one covering all the subtypes.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final int[]
This is a ref to the shared value in the FSIndexRepositoryImpl OR it may be null which means skip the checking (done for some internal routines which know they are not updating the index, and assume no other thread is)private final FSLeafIndexImpl<T>
private int
private final int
-
Constructor Summary
ConstructorsConstructorDescriptionFSIntIteratorImplBase
(FSLeafIndexImpl<T> fsLeafIndexImpl, int[] detectIllegalIndexUpdates) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.uima.internal.util.IntPointerIterator
copy, get, isValid, moveTo, moveToFirst, moveToLast
Methods inherited from interface org.apache.uima.cas.impl.LowLevelIterator
copy, isValid, ll_indexSize, moveTo, moveToFirst, moveToLast, moveToNext, moveToPrevious
-
Field Details
-
fsLeafIndexImpl
-
modificationSnapshot
private int modificationSnapshot -
detectIllegalIndexUpdates
protected final int[] detectIllegalIndexUpdatesThis is a ref to the shared value in the FSIndexRepositoryImpl OR it may be null which means skip the checking (done for some internal routines which know they are not updating the index, and assume no other thread is) -
typeCode
private final int typeCode
-
-
Constructor Details
-
FSIntIteratorImplBase
- Parameters:
fsLeafIndexImpl
- the leaf index this iterator is overdetectIllegalIndexUpdates
- may be null
-
-
Method Details
-
checkConcurrentModification
public void checkConcurrentModification() -
resetConcurrentModification
public void resetConcurrentModification() -
inc
public void inc()- Specified by:
inc
in interfaceIntPointerIterator
-
dec
public void dec()- Specified by:
dec
in interfaceIntPointerIterator
-
ll_getIndex
Description copied from interface:LowLevelIterator
Get the index for just the top most type of this iterator (excludes subtypes).- Specified by:
ll_getIndex
in interfaceLowLevelIterator
- Returns:
- The index.
-
compareTo
- Specified by:
compareTo
in interfaceComparable<T extends FeatureStructure>
-
ll_get
Description copied from interface:LowLevelIterator
Return the current FS reference.- Specified by:
ll_get
in interfaceLowLevelIterator
- Returns:
- The current FS reference.
- Throws:
NoSuchElementException
- Iff the iterator is not valid.
-
getFSLeafIndexImpl
FSLeafIndexImpl<T> getFSLeafIndexImpl() -
moveTo
void moveTo(int fs, boolean isExact)
-