Class FSIteratorImplBase<T extends FeatureStructure>

  • All Implemented Interfaces:
    java.util.Iterator<T>, java.util.ListIterator<T>, FSIterator<T>, LowLevelIterator<T>

    public abstract class FSIteratorImplBase<T extends FeatureStructure>
    extends java.lang.Object
    implements LowLevelIterator<T>
    Version 2 compatibility only, not used internally in version 3 Base class for FSIterator implementations. Defines the hasNext, next, and remove methods required by java.util.Iterator. Users writing their own iterator implementations may extend this class
    • Constructor Detail

      • FSIteratorImplBase

        public FSIteratorImplBase()
    • Method Detail

      • hasNext

        public boolean hasNext()
        Description copied from interface: FSIterator
        DEFAULT implementations of Iterator interface in terms of FSIterator methods
        Specified by:
        hasNext in interface FSIterator<T extends FeatureStructure>
        Specified by:
        hasNext in interface java.util.Iterator<T extends FeatureStructure>
        Specified by:
        hasNext in interface java.util.ListIterator<T extends FeatureStructure>
      • remove

        public void remove()
        Description copied from interface: FSIterator
        Removes from all the indexes associated with this view, the "current" Feature Structure (the one that would be returned by a "get()" operation).
        Specified by:
        remove in interface FSIterator<T extends FeatureStructure>
        Specified by:
        remove in interface java.util.Iterator<T extends FeatureStructure>
        Specified by:
        remove in interface java.util.ListIterator<T extends FeatureStructure>
      • getBegin

        int getBegin()
      • getEnd

        int getEnd()
      • moveTo

        <TT extends AnnotationFS> void moveTo​(int begin,
                                              int end)
        A special version of moveTo for subtypes of AnnotationFS, which moves to a particular begin/end (no type priority).
        Parameters:
        begin - the starting point (inclusive)
        end - the ending point (inclusive)
      • getComparator

        public java.util.Comparator<TOP> getComparator()
        default implementation of getComparator
        Specified by:
        getComparator in interface LowLevelIterator<T extends FeatureStructure>
        Returns:
        the comparator used by this iterator. It is always a withoutID style, and may be either a withType or NoType style.