Package org.apache.uima.cas.impl
Interface LowLevelIterator
- All Known Implementing Classes:
FSIndexFlat.FSIteratorFlat
,FSIntIteratorImplBase
,IntIterator4set
,LLUnambiguousIteratorImpl
public interface LowLevelIterator
Low-level FS iterator. Returns FS references, instead of FS objects.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncopy()
Create a copy of this iterator.boolean
isValid()
Check if the iterator is currently valid.int
ll_get()
Return the current FS reference.Get the index for just the top most type of this iterator (excludes subtypes).int
Return the size of the underlying index.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
.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.
-
Method Details
-
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:
true
iff the iterator is valid.
-
ll_get
Return the current FS reference.- Returns:
- The current FS reference.
- Throws:
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
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.
-