org.apache.uima.cas.impl

## Class FSIteratorImplBase<T extends FeatureStructure>

- java.lang.Object
- - org.apache.uima.cas.impl.FSIteratorImplBase<T>

- All Implemented Interfaces:
    Iterator<T>, ListIterator<T>, FSIterator<T>, LowLevelIterator<T>

      public abstract class FSIteratorImplBase<T extends FeatureStructure>
      extends 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

- - ### Field Summary

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

      `FS_ITERATOR_LOW_LEVEL_EMPTY, IS_ORDERED`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FSIteratorImplBase()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Comparator<TOP>` | `getComparator()` default implementation of getComparator
    `boolean` | `hasNext()` DEFAULT implementations of Iterator interface in terms of FSIterator methods
    `T` | `next()`
    `void` | `remove()` Removes from all the indexes associated with this view, the "current" Feature Structure (the one that would be returned by a "get()" operation).

    - ### 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.impl.LowLevelIterator

      `getArrayList, isIndexesHaveBeenUpdated, isMoveToSupported, ll_get, ll_getIndex, ll_indexSizeMaybeNotCurrent, ll_maxAnnotSpan, ll_remove, maybeReinitIterator, moveTo, moveTo, moveToFirst, moveToFirstNoReinit, moveToLast, moveToLastNoReinit, moveToNoReinit`

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

      `add, copy, get, getNvc, getType, hasPrevious, isValid, moveToNext, moveToNextNvc, moveToPrevious, moveToPreviousNvc, nextIndex, nextNvc, previous, previousIndex, previousNvc, set, size, spliterator, stream`

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

      `forEachRemaining`

- - ### 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 `Iterator<T extends FeatureStructure>`
      Specified by:
        `hasNext` in interface `ListIterator<T extends FeatureStructure>`
      Specified by:
        `hasNext` in interface `FSIterator<T extends FeatureStructure>`

    - #### next

          public T next()

      Specified by:
        `next` in interface `Iterator<T extends FeatureStructure>`
      Specified by:
        `next` in interface `ListIterator<T extends FeatureStructure>`
      Specified by:
        `next` in interface `FSIterator<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 `Iterator<T extends FeatureStructure>`
      Specified by:
        `remove` in interface `ListIterator<T extends FeatureStructure>`
      Specified by:
        `remove` in interface `FSIterator<T extends FeatureStructure>`

    - #### getComparator

          public 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.

Copyright © 2006–2022 The Apache Software Foundation. All rights reserved.