org.apache.uima.cas.impl

## Class FSLeafIndexImpl<T extends FeatureStructure>

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

- Type Parameters:
    `T` - the Java cover class type for this index, passed along to (wrapped) iterators producing Java cover classes
  All Implemented Interfaces:
    Comparator<T>, FSIndexImpl, LowLevelIndex, org.apache.uima.internal.util.IntComparator
  Direct Known Subclasses:
    FSBagIndex, FSIntArrayIndex, FSRBTSetIndex

      public abstract class FSLeafIndexImpl<T extends FeatureStructure>
      extends Object
      implements Comparator<T>, org.apache.uima.internal.util.IntComparator, FSIndexImpl

  The common (among all index kinds - set, sorted, bag) info for an index Subtypes define the actual index repository (integers indexing the CAS) for each kind.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected CASImpl` | `lowLevelCAS`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `FSLeafIndexImpl(CASImpl cas, Type type, int indexType)` Constructor for FSLeafIndexImpl.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected abstract void` | `bulkAddTo(org.apache.uima.internal.util.IntVector v)` For serialization: get all the items in this index and bulk add to an IntVector
    `int` | `compare(FeatureStructure fs1, FeatureStructure fs2)`
    `int` | `compare(int fs1, int fs2)` Note: may return other than -1 , 0, and 1 (e.g., might return -6)
    `abstract void` | `deleteFS(FeatureStructure fs)` Method deleteFS.
    `boolean` | `equals(Object obj)`
    `FSIndexComparator` | `getComparator()`
    `int` | `getIndexingStrategy()`
    `org.apache.uima.internal.util.IntPointerIterator` | `getIntIterator()`
    `Type` | `getType()`
    `int` | `hashCode()`
    `FSIterator<T>` | `iterator(FeatureStructure fs)`
    `int` | `ll_compare(int fs1, int fs2)` Note: may return other than -1 , 0, and 1 (e.g., might return -6)
    `LowLevelIterator` | `ll_iterator(boolean ambiguous)` Get a low-level, FS reference iterator.
    `LowLevelIterator` | `ll_rootIterator()` Get a low-level, FS reference iterator specifying instances of the precise type only (i.e.
    `abstract org.apache.uima.internal.util.ComparableIntPointerIterator<T>` | `pointerIterator(org.apache.uima.internal.util.IntComparator comp, int[] detectIllegalIndexUpdates, int typeCode)`
    `protected abstract org.apache.uima.internal.util.IntPointerIterator` | `refIterator()`
    `protected abstract org.apache.uima.internal.util.IntPointerIterator` | `refIterator(int fsCode)`
    `String` | `toString()`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

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

      `comparing, comparing, comparingDouble, comparingInt, comparingLong, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong`

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

      `flush`

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

      `ll_iterator, size`

- - ### Field Detail

    - #### lowLevelCAS

          protected final CASImpl lowLevelCAS

  - ### Constructor Detail

    - #### FSLeafIndexImpl

          protected FSLeafIndexImpl(CASImpl cas,
                                    Type type,
                                    int indexType)

      Constructor for FSLeafIndexImpl.
      Parameters:
        `cas` - -
        `type` - -
        `indexType` - -

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### pointerIterator

          public abstract org.apache.uima.internal.util.ComparableIntPointerIterator<T> pointerIterator(org.apache.uima.internal.util.IntComparator comp,
                                                                                                        int[] detectIllegalIndexUpdates,
                                                                                                        int typeCode)

    - #### getComparator

          public FSIndexComparator getComparator()

      Specified by:
        `getComparator` in interface `FSIndexImpl`
      Returns:
        the FSIndexComparator structure used by this index

    - #### getIndexingStrategy

          public int getIndexingStrategy()

    - #### ll_compare

          public int ll_compare(int fs1,
                                int fs2)

      Note: may return other than -1 , 0, and 1 (e.g., might return -6)
      Specified by:
        `ll_compare` in interface `LowLevelIndex`
      Parameters:
        `fs1` - -
        `fs2` - -
      Returns:
        0 if equal, < 0 if fs1 < fs2, > 0 if fs1 > fs2

    - #### compare

          public int compare(int fs1,
                             int fs2)

      Note: may return other than -1 , 0, and 1 (e.g., might return -6)
      Specified by:
        `compare` in interface `org.apache.uima.internal.util.IntComparator`
      Parameters:
        `fs1` - -
        `fs2` - -
      Returns:
        0 if equal, < 0 if fs1 < fs2, > 0 if fs1 > fs2

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object obj)

      Specified by:
        `equals` in interface `Comparator<T extends FeatureStructure>`
      Overrides:
        `equals` in class `Object`

    - #### compare

          public int compare(FeatureStructure fs1,
                             FeatureStructure fs2)

      Specified by:
        `compare` in interface `Comparator<T extends FeatureStructure>`
      See Also:
        `FSIndex.compare(FeatureStructure, FeatureStructure)`

    - #### getType

          public Type getType()

      Returns:
        The type of feature structures in this index.
      See Also:
        `FSIndex.getType()`

    - #### refIterator

          protected abstract org.apache.uima.internal.util.IntPointerIterator refIterator()

    - #### getIntIterator

          public org.apache.uima.internal.util.IntPointerIterator getIntIterator()

      Specified by:
        `getIntIterator` in interface `FSIndexImpl`

    - #### bulkAddTo

          protected abstract void bulkAddTo(org.apache.uima.internal.util.IntVector v)

      For serialization: get all the items in this index and bulk add to an IntVector
      Parameters:
        `v` - the set of items to add

    - #### refIterator

          protected abstract org.apache.uima.internal.util.IntPointerIterator refIterator(int fsCode)

    - #### iterator

          public FSIterator<T> iterator(FeatureStructure fs)

      Parameters:
        `fs` - -
      Returns:
        -
      See Also:
        `This has no callers, and is probably not used. The iterator it produces is only over one leaf index and doesn't include Concurrent Modification Exception testing`

    - #### deleteFS

          public abstract void deleteFS(FeatureStructure fs)

      Method deleteFS.
      Parameters:
        `fs` - -

    - #### ll_iterator

          public LowLevelIterator ll_iterator(boolean ambiguous)

      Description copied from interface: `LowLevelIndex`
      Get a low-level, FS reference iterator. This iterator can be disambiguated. This means that only non-overlapping annotations will be returned. Non-annotation FSs will be filtered in this mode.
      Specified by:
        `ll_iterator` in interface `LowLevelIndex`
      Parameters:
        `ambiguous` - When set to `false`, iterator will be disambiguated.
      Returns:
        An iterator for this index.

    - #### ll_rootIterator

          public LowLevelIterator ll_rootIterator()

      Description copied from interface: `LowLevelIndex`
      Get a low-level, FS reference iterator specifying instances of the precise type only (i.e. without listing the subtypes).
      Specified by:
        `ll_rootIterator` in interface `LowLevelIndex`
      Returns:
        An iterator for the root type of this index.

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