org.apache.uima.cas.impl
Class Subiterator<T extends AnnotationFS>

java.lang.Object
  extended by org.apache.uima.cas.impl.FSIteratorImplBase<T>
      extended by org.apache.uima.cas.impl.Subiterator<T>
All Implemented Interfaces:
java.util.Iterator<T>, FSIterator<T>

public class Subiterator<T extends AnnotationFS>
extends FSIteratorImplBase<T>

Subiterator implementation.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.uima.cas.impl.FSIteratorImplBase
FSIteratorImplBase.AnnotationComparator<T extends FeatureStructure>
 
Method Summary
 FSIterator<T> copy()
          Copy this iterator.
 T get()
          Get the structure the iterator is pointing at.
 boolean isValid()
          Check if this iterator is valid.
 void moveTo(FeatureStructure fs)
          Move the iterator to the first features structure that is equal to fs.
 void moveToFirst()
          Move the iterator to the first element.
 void moveToLast()
          Move the iterator to the last element.
 void moveToNext()
          Advance the iterator.
 void moveToPrevious()
          Move the iterator one element back.
 
Methods inherited from class org.apache.uima.cas.impl.FSIteratorImplBase
hasNext, next, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isValid

public boolean isValid()
Description copied from interface: FSIterator
Check if this iterator is valid.

Returns:
true if the iterator is valid.

get

public T get()
                           throws java.util.NoSuchElementException
Description copied from interface: FSIterator
Get the structure the iterator is pointing at.

Returns:
The structure the iterator is pointing at.
Throws:
java.util.NoSuchElementException - If the iterator is not valid.

moveToNext

public void moveToNext()
Description copied from interface: FSIterator
Advance the iterator. This may invalidate the iterator.


moveToPrevious

public void moveToPrevious()
Description copied from interface: FSIterator
Move the iterator one element back. This may invalidate the iterator.


moveToFirst

public void moveToFirst()
Description copied from interface: FSIterator
Move the iterator to the first element. The iterator will be valid iff the underlying collection is non-empty.


moveToLast

public void moveToLast()
Description copied from interface: FSIterator
Move the iterator to the last element. The iterator will be valid iff the underlying collection is non-empty.


moveTo

public void moveTo(FeatureStructure fs)
Description copied from interface: FSIterator
Move the iterator to the first features structure that is equal to fs. If no such feature structure exists in the underlying collection, set the iterator to the "insertion point" for fs, i.e., to a point where the current feature structure is greater than fs, and the previous one is less than fs.

Parameters:
fs - The feature structure the iterator should be set to.

copy

public FSIterator<T> copy()
Description copied from interface: FSIterator
Copy this iterator.

Returns:
A copy of this iterator, pointing at the same element.


Copyright © 2013. All Rights Reserved.