org.apache.uima.cas.impl

## Class FSIntIteratorImplBase<T extends FeatureStructure>

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

- All Implemented Interfaces:
    Comparable<FSIntIteratorImplBase<T>>, LowLevelIterator, org.apache.uima.internal.util.ComparableIntPointerIterator<T>, org.apache.uima.internal.util.IntPointerIterator
  Direct Known Subclasses:
    IntIterator4set

      public abstract class FSIntIteratorImplBase<T extends FeatureStructure>
      extends Object
      implements org.apache.uima.internal.util.ComparableIntPointerIterator<T>, LowLevelIterator

  Base class for int Iterators over indexes. There are 3 styles of indexes, one for Sorted, one for Sets and one for Bag. There is a separate int iterator for each of these styles: IntIterator4bag IntIterator4sorted IntArrayRBTIterator There are also specialized int iterators: SnapshotPointerIterator - iterates over a one-time flat snapshot FlatIterator - iterates over a flattened array of Java Objects (not ints) - so this is excluded from this discussion because this class is only for int iterators. This class is the superclass of the 3 standard int iterators, and the SnapshotPointerIterator. It is an iterator for just one UIMA type (excludes subtypes). Other wrappers handle combining multiple of these kinds of iterators into one covering all the subtypes.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int[]` | `detectIllegalIndexUpdates` This is a ref to the shared value in the FSIndexRepositoryImpl OR it may be null which means skip the checking (done for some internal routines which know they are not updating the index, and assume no other thread is)

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FSIntIteratorImplBase(FSLeafIndexImpl<T> fsLeafIndexImpl, int[] detectIllegalIndexUpdates)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `checkConcurrentModification()`
    `int` | `compareTo(FSIntIteratorImplBase<T> o)`
    `void` | `dec()`
    `void` | `inc()`
    `int` | `ll_get()` Return the current FS reference.
    `LowLevelIndex` | `ll_getIndex()` Get the index for just the top most type of this iterator (excludes subtypes).
    `void` | `resetConcurrentModification()`

    - ### 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.internal.util.IntPointerIterator

      `copy, get, isValid, moveTo, moveToFirst, moveToLast`

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

      `copy, isValid, ll_indexSize, moveTo, moveToFirst, moveToLast, moveToNext, moveToPrevious`

- - ### Field Detail

    - #### detectIllegalIndexUpdates

          protected final int[] detectIllegalIndexUpdates

      This is a ref to the shared value in the FSIndexRepositoryImpl OR it may be null which means skip the checking (done for some internal routines which know they are not updating the index, and assume no other thread is)

  - ### Constructor Detail

    - #### FSIntIteratorImplBase

          public FSIntIteratorImplBase(FSLeafIndexImpl<T> fsLeafIndexImpl,
                                       int[] detectIllegalIndexUpdates)

      Parameters:
        `fsLeafIndexImpl` - the leaf index this iterator is over
        `detectIllegalIndexUpdates` - may be null

  - ### Method Detail

    - #### checkConcurrentModification

          public void checkConcurrentModification()

    - #### resetConcurrentModification

          public void resetConcurrentModification()

    - #### inc

          public void inc()

      Specified by:
        `inc` in interface `org.apache.uima.internal.util.IntPointerIterator`

    - #### dec

          public void dec()

      Specified by:
        `dec` in interface `org.apache.uima.internal.util.IntPointerIterator`

    - #### ll_getIndex

          public LowLevelIndex ll_getIndex()

      Description copied from interface: `LowLevelIterator`
      Get the index for just the top most type of this iterator (excludes subtypes).
      Specified by:
        `ll_getIndex` in interface `LowLevelIterator`
      Returns:
        The index.

    - #### compareTo

          public int compareTo(FSIntIteratorImplBase<T> o)

      Specified by:
        `compareTo` in interface `Comparable<FSIntIteratorImplBase<T extends FeatureStructure>>`

    - #### ll_get

          public int ll_get()
                     throws NoSuchElementException

      Description copied from interface: `LowLevelIterator`
      Return the current FS reference.
      Specified by:
        `ll_get` in interface `LowLevelIterator`
      Returns:
        The current FS reference.
      Throws:
        `NoSuchElementException` - Iff the iterator is not valid.

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