org.apache.uima.cas.impl

## Interface LowLevelIterator

- All Known Implementing Classes:
    FSIndexFlat.FSIteratorFlat, FSIntIteratorImplBase, IntIterator4set, LLUnambiguousIteratorImpl

      public interface LowLevelIterator

  Low-level FS iterator. Returns FS references, instead of FS objects.
  See Also:
    `FSIterator`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `copy()` Create a copy of this iterator.
    `boolean` | `isValid()` Check if the iterator is currently valid.
    `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).
    `int` | `ll_indexSize()` Return the size of the underlying index.
    `void` | `moveTo(int fsRef)` Try to position the iterator so that the current element is greater than or equal to `fsRef`, and previous elements are less than `fsRef`.
    `void` | `moveToFirst()` Move iterator to first FS in index.
    `void` | `moveToLast()` Move iterator to last FS in index.
    `void` | `moveToNext()` Advance the iterator.
    `void` | `moveToPrevious()` Move the iterator back one position.

- - ### Method Detail

    - #### moveToFirst

          void moveToFirst()

      Move iterator to first FS in index. A subsequent call to `isValid()` will succeed iff the index is non-empty.

    - #### moveToLast

          void moveToLast()

      Move iterator to last FS in index. A subsequent call to `isValid()` will succeed iff the index is non-empty.

    - #### isValid

          boolean isValid()

      Check if the iterator is currently valid.
      Returns:
        `true` iff the iterator is valid.

    - #### ll_get

          int ll_get()
              throws NoSuchElementException

      Return the current FS reference.
      Returns:
        The current FS reference.
      Throws:
        `NoSuchElementException` - Iff the iterator is not valid.

    - #### moveToNext

          void moveToNext()

      Advance the iterator. This may invalidate the iterator.

    - #### moveToPrevious

          void moveToPrevious()

      Move the iterator back one position. This may invalidate the iterator.

    - #### moveTo

          void moveTo(int fsRef)

      Try to position the iterator so that the current element is greater than or equal to `fsRef`, and previous elements are less than `fsRef`. This may invalidate the iterator. If fsRef can not be compared to FSs in the index, the results are undefined.
      Parameters:
        `fsRef` - The FS reference the iterator should be set to.

    - #### copy

          Object copy()

      Create a copy of this iterator. The copy will point at the same element that this iterator is currently pointing at.
      Returns:
        A copy of this iterator.

    - #### ll_indexSize

          int ll_indexSize()

      Return the size of the underlying index.
      Returns:
        The size of the index.

    - #### ll_getIndex

          LowLevelIndex ll_getIndex()

      Get the index for just the top most type of this iterator (excludes subtypes).
      Returns:
        The index.

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