org.apache.uima.cas.impl

## Interface CopyOnWriteIndexPart<T extends FeatureStructure>

-     public interface CopyOnWriteIndexPart<T extends FeatureStructure>

  common APIs supporting the copy on write aspect of index parts

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `copyToArray(T[] target, int startingIndexInTarget)` Copy FS refs to target from this index part
    `boolean` | `isOriginal()`
    `Iterator<T>` | `iterator()`
    `void` | `makeReadOnlyCopy()`
    `int` | `size()`

- - ### Method Detail

    - #### makeReadOnlyCopy

          void makeReadOnlyCopy()

    - #### isOriginal

          boolean isOriginal()

      Returns:
        true if this cow version is the same as the original. true means the index has not been updated

    - #### size

          int size()

      Returns:
        The number of elements in the index

    - #### iterator

          Iterator<T> iterator()

      Returns:
        iterator over all the elements

    - #### copyToArray

          int copyToArray(T[] target,
                          int startingIndexInTarget)

      Copy FS refs to target from this index part
      Parameters:
        `target` - the target array to copy into
        `startingIndexInTarget` - the starting index in the target array
      Returns:
        startingIndexInTarget + size

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