Package de.julielab.jcore.utility
Class JCoReFSListIterator<T extends org.apache.uima.cas.FeatureStructure>
- java.lang.Object
-
- de.julielab.jcore.utility.JCoReFSListIterator<T>
-
- All Implemented Interfaces:
java.util.Iterator<T>,org.apache.uima.cas.FSIterator<T>
public class JCoReFSListIterator<T extends org.apache.uima.cas.FeatureStructure> extends java.lang.Object implements org.apache.uima.cas.FSIterator<T>An iterator that takes a list of FeatureStructures and returns or navigates its elements exactly in the order the list defines. Actually, the iterator operates on the exact list, so changes are write-through. External changes to the list while iterating may lead to undefined behavior of the iterator.
Since no natural order of the list elements is assumed, themoveTo(FeatureStructure)method is currently not implemented since it couldn't behave as defined in the contract of FSIterator.- Author:
- faessler
-
-
Constructor Summary
Constructors Constructor Description JCoReFSListIterator(java.util.List<T> list)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.uima.cas.FSIterator<T>copy()Tget()booleanhasNext()booleanisValid()voidmoveTo(org.apache.uima.cas.FeatureStructure fs)voidmoveToFirst()voidmoveToLast()voidmoveToNext()voidmoveToPrevious()Tnext()voidremove()
-
-
-
Constructor Detail
-
JCoReFSListIterator
public JCoReFSListIterator(java.util.List<T> list)
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfacejava.util.Iterator<T extends org.apache.uima.cas.FeatureStructure>
-
next
public T next()
- Specified by:
nextin interfacejava.util.Iterator<T extends org.apache.uima.cas.FeatureStructure>
-
remove
public void remove()
- Specified by:
removein interfacejava.util.Iterator<T extends org.apache.uima.cas.FeatureStructure>
-
isValid
public boolean isValid()
- Specified by:
isValidin interfaceorg.apache.uima.cas.FSIterator<T extends org.apache.uima.cas.FeatureStructure>
-
get
public T get() throws java.util.NoSuchElementException
- Specified by:
getin interfaceorg.apache.uima.cas.FSIterator<T extends org.apache.uima.cas.FeatureStructure>- Throws:
java.util.NoSuchElementException
-
moveToNext
public void moveToNext()
- Specified by:
moveToNextin interfaceorg.apache.uima.cas.FSIterator<T extends org.apache.uima.cas.FeatureStructure>
-
moveToPrevious
public void moveToPrevious()
- Specified by:
moveToPreviousin interfaceorg.apache.uima.cas.FSIterator<T extends org.apache.uima.cas.FeatureStructure>
-
moveToFirst
public void moveToFirst()
- Specified by:
moveToFirstin interfaceorg.apache.uima.cas.FSIterator<T extends org.apache.uima.cas.FeatureStructure>
-
moveToLast
public void moveToLast()
- Specified by:
moveToLastin interfaceorg.apache.uima.cas.FSIterator<T extends org.apache.uima.cas.FeatureStructure>
-
moveTo
public void moveTo(org.apache.uima.cas.FeatureStructure fs)
- Specified by:
moveToin interfaceorg.apache.uima.cas.FSIterator<T extends org.apache.uima.cas.FeatureStructure>
-
-