Package org.apache.uima.cas.impl
Interface LowLevelIterator
-
- All Known Implementing Classes:
FSIndexFlat.FSIteratorFlat,FSIntIteratorImplBase,IntIterator4set,LLUnambiguousIteratorImpl
public interface LowLevelIteratorLow-level FS iterator. Returns FS references, instead of FS objects.- See Also:
FSIterator
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Objectcopy()Create a copy of this iterator.booleanisValid()Check if the iterator is currently valid.intll_get()Return the current FS reference.LowLevelIndexll_getIndex()Get the index for just the top most type of this iterator (excludes subtypes).intll_indexSize()Return the size of the underlying index.voidmoveTo(int fsRef)Try to position the iterator so that the current element is greater than or equal tofsRef, and previous elements are less thanfsRef.voidmoveToFirst()Move iterator to first FS in index.voidmoveToLast()Move iterator to last FS in index.voidmoveToNext()Advance the iterator.voidmoveToPrevious()Move the iterator back one position.
-
-
-
Method Detail
-
moveToFirst
void moveToFirst()
Move iterator to first FS in index. A subsequent call toisValid()will succeed iff the index is non-empty.
-
moveToLast
void moveToLast()
Move iterator to last FS in index. A subsequent call toisValid()will succeed iff the index is non-empty.
-
isValid
boolean isValid()
Check if the iterator is currently valid.- Returns:
trueiff the iterator is valid.
-
ll_get
int ll_get() throws java.util.NoSuchElementExceptionReturn the current FS reference.- Returns:
- The current FS reference.
- Throws:
java.util.NoSuchElementException- Iff the iterator is not valid.
-
moveToNext
void moveToNext()
Advance the iterator. This may invalidate the iterator.
-
moveToPrevious
void moveToPrevious()
Move the iterator back one position. This may invalidate the iterator.
-
moveTo
void moveTo(int fsRef)
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:
fsRef- The FS reference the iterator should be set to.
-
copy
java.lang.Object copy()
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.
-
ll_indexSize
int ll_indexSize()
Return the size of the underlying index.- Returns:
- The size of the index.
-
ll_getIndex
LowLevelIndex ll_getIndex()
Get the index for just the top most type of this iterator (excludes subtypes).- Returns:
- The index.
-
-