Package org.apache.uima.cas.impl

# 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 Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected int`
  `lastValidIteratorIndex`
  index into nonEmptyIterators, shows last valid one

  ### Fields inherited from class org.apache.uima.cas.impl.FsIterator_multiple_indexes

  `allIterators, comparatorMaybeNoTypeWithoutId, main_idx, nonEmptyIterators`

  ### Fields inherited from interface org.apache.uima.cas.impl.LowLevelIterator

  `FS_ITERATOR_LOW_LEVEL_EMPTY, IS_ORDERED`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FsIterator_subtypes_ordered(org.apache.uima.cas.impl.FsIndex_iicp<T> iicp, Comparator<TOP> comparatorMaybeNoTypeWithoutId)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `FSIterator<T>`
  `copy()`
  Copy this iterator.
  `Comparator<TOP>`
  `getComparator()`
  `T`
  `getNvc()`
  Get the structure the iterator is pointing at.
  `boolean`
  `isMoveToSupported()`
  `boolean`
  `isValid()`
  Check if this iterator is valid.
  `void`
  `moveToFirstNoReinit()`
  Move operators have to move a group of iterators for this type and all its subtypes
  `void`
  `moveToLastNoReinit()`
  Internal use same as moveToLast, but won't reset to use current contents of index if index has changed
  `void`
  `moveToNextNvc()`
  version of moveToNext which bypasses the isValid check - call only if you've just done this check yourself
  `void`
  `moveToNoReinit(FeatureStructure fs)`
  Internal use same as moveTo(fs), but won't reset to use current contents of index if index has changed
  `void`
  `moveToPreviousNvc()`
  version of moveToPrevious which bypasses the isValid check - call only if you've just done this check yourself

  ### Methods inherited from class org.apache.uima.cas.impl.FsIterator_multiple_indexes

  `isIndexesHaveBeenUpdated, ll_getIndex, ll_indexSizeMaybeNotCurrent, ll_maxAnnotSpan, maybeReinitIterator, separate_into_empty_indexes_and_non_empty_iterators, size`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface org.apache.uima.cas.FSIterator

  `add, get, getType, hasNext, hasPrevious, moveToNext, moveToPrevious, next, nextIndex, nextNvc, previous, previousIndex, previousNvc, remove, set, spliterator, stream`

  ### Methods inherited from interface java.util.Iterator

  `forEachRemaining`

  ### Methods inherited from interface org.apache.uima.cas.impl.LowLevelIterator

  `getArrayList, ll_get, ll_remove, moveTo, moveTo, moveToFirst, moveToLast`

- ## 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