Class JCoReFSListIterator<T extends org.apache.uima.cas.FeatureStructure>

  • 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, the moveTo(FeatureStructure) method is currently not implemented since it couldn't behave as defined in the contract of FSIterator.
    Author:
    faessler
    • Constructor Detail

      • JCoReFSListIterator

        public JCoReFSListIterator​(java.util.List<T> list)
    • Method Detail

      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<T extends org.apache.uima.cas.FeatureStructure>
      • next

        public T next()
        Specified by:
        next in interface java.util.Iterator<T extends org.apache.uima.cas.FeatureStructure>
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<T extends org.apache.uima.cas.FeatureStructure>
      • isValid

        public boolean isValid()
        Specified by:
        isValid in interface org.apache.uima.cas.FSIterator<T extends org.apache.uima.cas.FeatureStructure>
      • get

        public T get()
              throws java.util.NoSuchElementException
        Specified by:
        get in interface org.apache.uima.cas.FSIterator<T extends org.apache.uima.cas.FeatureStructure>
        Throws:
        java.util.NoSuchElementException
      • moveToNext

        public void moveToNext()
        Specified by:
        moveToNext in interface org.apache.uima.cas.FSIterator<T extends org.apache.uima.cas.FeatureStructure>
      • moveToPrevious

        public void moveToPrevious()
        Specified by:
        moveToPrevious in interface org.apache.uima.cas.FSIterator<T extends org.apache.uima.cas.FeatureStructure>
      • moveToFirst

        public void moveToFirst()
        Specified by:
        moveToFirst in interface org.apache.uima.cas.FSIterator<T extends org.apache.uima.cas.FeatureStructure>
      • moveToLast

        public void moveToLast()
        Specified by:
        moveToLast in interface org.apache.uima.cas.FSIterator<T extends org.apache.uima.cas.FeatureStructure>
      • moveTo

        public void moveTo​(org.apache.uima.cas.FeatureStructure fs)
        Specified by:
        moveTo in interface org.apache.uima.cas.FSIterator<T extends org.apache.uima.cas.FeatureStructure>
      • copy

        public org.apache.uima.cas.FSIterator<T> copy()
        Specified by:
        copy in interface org.apache.uima.cas.FSIterator<T extends org.apache.uima.cas.FeatureStructure>