org.apache.uima.cas.impl
Interface LowLevelIterator

All Known Implementing Classes:
LLUnambiguousIteratorImpl

public interface LowLevelIterator

Low-level FS iterator. Returns FS references, instead of FS objects.

See Also:
FSIterator

Method Summary
 java.lang.Object copy()
          Create a copy of this iterator.
 boolean isValid()
          Check if the iterator is currently valid.
 int ll_get()
          Return the current FS reference.
 LowLevelIndex ll_getIndex()
          Get the index of this iterator.
 int ll_indexSize()
          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 to fsRef, and previous elements are less than fsRef.
 void moveToFirst()
          Move iterator to first FS in index.
 void moveToLast()
          Move iterator to last FS in index.
 void moveToNext()
          Advance the iterator.
 void moveToPrevious()
          Move the iterator back one position.
 

Method Detail

moveToFirst

void moveToFirst()
Move iterator to first FS in index. A subsequent call to isValid() will succeed iff the index is non-empty.


moveToLast

void moveToLast()
Move iterator to last FS in index. A subsequent call to isValid() 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

int ll_get()
           throws java.util.NoSuchElementException
Return 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 to fsRef, and previous elements are less than fsRef. 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 of this iterator.

Returns:
The index.


Copyright © 2013. All Rights Reserved.