Package org.apache.uima.cas.impl
Class FSIntIteratorImplBase<T extends FeatureStructure>
- java.lang.Object
-
- org.apache.uima.cas.impl.FSIntIteratorImplBase<T>
-
- All Implemented Interfaces:
java.lang.Comparable<FSIntIteratorImplBase<T>>,LowLevelIterator,ComparableIntPointerIterator<T>,IntPointerIterator
- Direct Known Subclasses:
IntIterator4set
public abstract class FSIntIteratorImplBase<T extends FeatureStructure> extends java.lang.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
Fields Modifier and Type Field Description protected 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)
-
Constructor Summary
Constructors Constructor Description FSIntIteratorImplBase(FSLeafIndexImpl<T> fsLeafIndexImpl, int[] detectIllegalIndexUpdates)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckConcurrentModification()intcompareTo(FSIntIteratorImplBase<T> o)voiddec()voidinc()intll_get()Return the current FS reference.LowLevelIndexll_getIndex()Get the index for just the top most type of this iterator (excludes subtypes).voidresetConcurrentModification()-
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 Detail
-
detectIllegalIndexUpdates
protected final int[] detectIllegalIndexUpdates
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)
-
-
Constructor Detail
-
FSIntIteratorImplBase
public FSIntIteratorImplBase(FSLeafIndexImpl<T> fsLeafIndexImpl, int[] detectIllegalIndexUpdates)
- Parameters:
fsLeafIndexImpl- the leaf index this iterator is overdetectIllegalIndexUpdates- may be null
-
-
Method Detail
-
checkConcurrentModification
public void checkConcurrentModification()
-
resetConcurrentModification
public void resetConcurrentModification()
-
inc
public void inc()
- Specified by:
incin interfaceIntPointerIterator
-
dec
public void dec()
- Specified by:
decin interfaceIntPointerIterator
-
ll_getIndex
public LowLevelIndex ll_getIndex()
Description copied from interface:LowLevelIteratorGet the index for just the top most type of this iterator (excludes subtypes).- Specified by:
ll_getIndexin interfaceLowLevelIterator- Returns:
- The index.
-
compareTo
public int compareTo(FSIntIteratorImplBase<T> o)
- Specified by:
compareToin interfacejava.lang.Comparable<T extends FeatureStructure>
-
ll_get
public int ll_get() throws java.util.NoSuchElementExceptionDescription copied from interface:LowLevelIteratorReturn the current FS reference.- Specified by:
ll_getin interfaceLowLevelIterator- Returns:
- The current FS reference.
- Throws:
java.util.NoSuchElementException- Iff the iterator is not valid.
-
-