Package org.apache.uima.cas.impl
Class IntIterator4sorted<T extends FeatureStructure>
java.lang.Object
org.apache.uima.cas.impl.FSIntIteratorImplBase<T>
org.apache.uima.cas.impl.IntIterator4sorted<T>
- All Implemented Interfaces:
Comparable<FSIntIteratorImplBase<T>>
,LowLevelIterator
,ComparableIntPointerIterator<T>
,IntPointerIterator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final IntComparator
private final FSIntArrayIndex<T>
private final IntVector
private int
Fields inherited from class org.apache.uima.cas.impl.FSIntIteratorImplBase
detectIllegalIndexUpdates
-
Constructor Summary
ConstructorsConstructorDescriptionIntIterator4sorted
(FSIntArrayIndex<T> index, int[] detectIllegalIndexUpdates) IntIterator4sorted
(FSIntArrayIndex<T> index, int[] detectIllegalIndexUpdates, IntComparator comp) -
Method Summary
Modifier and TypeMethodDescriptionint
copy()
Create a copy of this iterator.int
get()
boolean
isValid()
Check if the iterator is currently valid.int
Return the size of the underlying index.void
moveTo
(int i) Try to position the iterator so that the current element is greater than or equal tofsRef
, and previous elements are less thanfsRef
.(package private) void
moveTo
(int i, boolean isExact) void
Move iterator to first FS in index.void
Move iterator to last FS in index.void
Advance the iterator.void
Move the iterator back one position.Methods inherited from class org.apache.uima.cas.impl.FSIntIteratorImplBase
checkConcurrentModification, dec, getFSLeafIndexImpl, inc, ll_get, ll_getIndex, resetConcurrentModification
-
Field Details
-
itPos
private int itPos -
comp
-
indexIntVector
-
fsIntArrayIndex
-
-
Constructor Details
-
IntIterator4sorted
IntIterator4sorted(FSIntArrayIndex<T> index, int[] detectIllegalIndexUpdates) -
IntIterator4sorted
IntIterator4sorted(FSIntArrayIndex<T> index, int[] detectIllegalIndexUpdates, IntComparator comp)
-
-
Method Details
-
isValid
public boolean isValid()Description copied from interface:LowLevelIterator
Check if the iterator is currently valid.- Returns:
true
iff the iterator is valid.
-
moveToFirst
public void moveToFirst()Description copied from interface:LowLevelIterator
Move iterator to first FS in index. A subsequent call toisValid()
will succeed iff the index is non-empty. -
moveToLast
public void moveToLast()Description copied from interface:LowLevelIterator
Move iterator to last FS in index. A subsequent call toisValid()
will succeed iff the index is non-empty. -
moveToNext
public void moveToNext()Description copied from interface:LowLevelIterator
Advance the iterator. This may invalidate the iterator. -
moveToPrevious
public void moveToPrevious()Description copied from interface:LowLevelIterator
Move the iterator back one position. This may invalidate the iterator. -
get
public int get() -
copy
Description copied from interface:LowLevelIterator
Create a copy of this iterator. The copy will point at the same element that this iterator is currently pointing at.- Returns:
- A copy of this iterator.
- See Also:
-
compareTo
- Specified by:
compareTo
in interfaceComparable<T extends FeatureStructure>
- Overrides:
compareTo
in classFSIntIteratorImplBase<T extends FeatureStructure>
-
moveTo
public void moveTo(int i) Description copied from interface:LowLevelIterator
Try to position the iterator so that the current element is greater than or equal tofsRef
, and previous elements are less thanfsRef
. This may invalidate the iterator. If fsRef can not be compared to FSs in the index, the results are undefined.- Parameters:
i
- The FS reference the iterator should be set to.- See Also:
-
moveTo
void moveTo(int i, boolean isExact) - Overrides:
moveTo
in classFSIntIteratorImplBase<T extends FeatureStructure>
-
ll_indexSize
public int ll_indexSize()Description copied from interface:LowLevelIterator
Return the size of the underlying index.- Returns:
- The size of the index.
-