Class FsIterator_subtypes_ordered<T extends FeatureStructure>

java.lang.Object
org.apache.uima.cas.impl.FsIterator_multiple_indexes<T>
org.apache.uima.cas.impl.FsIterator_subtypes_ordered<T>
Type Parameters:
T - result type
All Implemented Interfaces:
Iterator<T>, ListIterator<T>, FSIterator<T>, LowLevelIterator<T>

public class FsIterator_subtypes_ordered<T extends FeatureStructure> extends FsIterator_multiple_indexes<T>
Performs an ordered iteration among a set of iterators, each one corresponding to the type or subtype of the uppermost type. The set of iterators is maintained in an array, with the 0th element being the current valid iterator.
  • Field Details

    • lastValidIteratorIndex

      protected int lastValidIteratorIndex
      index into nonEmptyIterators, shows last valid one
  • Constructor Details

    • FsIterator_subtypes_ordered

      public FsIterator_subtypes_ordered(org.apache.uima.cas.impl.FsIndex_iicp<T> iicp, Comparator<TOP> comparatorMaybeNoTypeWithoutId)
  • Method Details

    • moveToFirstNoReinit

      public void moveToFirstNoReinit()
      Move operators have to move a group of iterators for this type and all its subtypes
    • moveToLastNoReinit

      public void moveToLastNoReinit()
      Description copied from interface: LowLevelIterator
      Internal use same as moveToLast, but won't reset to use current contents of index if index has changed
    • moveToNextNvc

      public void moveToNextNvc()
      Description copied from interface: FSIterator
      version of moveToNext which bypasses the isValid check - call only if you've just done this check yourself
    • moveToPreviousNvc

      public void moveToPreviousNvc()
      Description copied from interface: FSIterator
      version of moveToPrevious which bypasses the isValid check - call only if you've just done this check yourself
    • isValid

      public boolean isValid()
      Description copied from interface: FSIterator
      Check if this iterator is valid.
      Returns:
      true if the iterator is valid.
    • getNvc

      public T getNvc() throws NoSuchElementException
      Description copied from interface: FSIterator
      Get the structure the iterator is pointing at. Throws various unchecked exceptions, if the iterator is not valid
      Returns:
      The structure the iterator is pointing at.
      Throws:
      NoSuchElementException
    • moveToNoReinit

      public void moveToNoReinit(FeatureStructure fs)
      Description copied from interface: LowLevelIterator
      Internal use same as moveTo(fs), but won't reset to use current contents of index if index has changed
      Parameters:
      fs - the fs to use as the template identifying the place to move 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.
    • getComparator

      public Comparator<TOP> getComparator()
      Returns:
      the comparator used by this iterator. It is always a withoutID style, and may be either a withType or NoType style.
    • isMoveToSupported

      public boolean isMoveToSupported()
      Returns:
      false if this iterator is over an unordered collection or set or bag