Class FSIndexFlat.FSIteratorFlat<TI extends FeatureStructure>

java.lang.Object
org.apache.uima.cas.impl.FSIteratorImplBase<TI>
org.apache.uima.cas.impl.FSIndexFlat.FSIteratorFlat<TI>
All Implemented Interfaces:
Iterator<TI>, FSIterator<TI>, LowLevelIterator
Enclosing class:
FSIndexFlat<T extends FeatureStructure>

public static class FSIndexFlat.FSIteratorFlat<TI extends FeatureStructure> extends FSIteratorImplBase<TI> implements LowLevelIterator
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • next

      public TI next()
      Specified by:
      next in interface Iterator<TI extends FeatureStructure>
      Overrides:
      next in class FSIteratorImplBase<TI extends FeatureStructure>
    • isValid

      public boolean isValid()
      Description copied from interface: LowLevelIterator
      Check if the iterator is currently valid.
      Specified by:
      isValid in interface FSIterator<TI extends FeatureStructure>
      Specified by:
      isValid in interface LowLevelIterator
      Returns:
      true iff the iterator is valid.
    • get

      public TI get() throws NoSuchElementException
      Description copied from interface: FSIterator
      Get the structure the iterator is pointing at.
      Specified by:
      get in interface FSIterator<TI extends FeatureStructure>
      Returns:
      The structure the iterator is pointing at.
      Throws:
      NoSuchElementException - If the iterator is not valid.
    • moveToNext

      public void moveToNext()
      Description copied from interface: LowLevelIterator
      Advance the iterator. This may invalidate the iterator.
      Specified by:
      moveToNext in interface FSIterator<TI extends FeatureStructure>
      Specified by:
      moveToNext in interface LowLevelIterator
    • moveToPrevious

      public void moveToPrevious()
      Description copied from interface: LowLevelIterator
      Move the iterator back one position. This may invalidate the iterator.
      Specified by:
      moveToPrevious in interface FSIterator<TI extends FeatureStructure>
      Specified by:
      moveToPrevious in interface LowLevelIterator
    • moveToFirst

      public void moveToFirst()
      Description copied from interface: LowLevelIterator
      Move iterator to first FS in index. A subsequent call to isValid() will succeed iff the index is non-empty.
      Specified by:
      moveToFirst in interface FSIterator<TI extends FeatureStructure>
      Specified by:
      moveToFirst in interface LowLevelIterator
    • moveToLast

      public void moveToLast()
      Description copied from interface: LowLevelIterator
      Move iterator to last FS in index. A subsequent call to isValid() will succeed iff the index is non-empty.
      Specified by:
      moveToLast in interface FSIterator<TI extends FeatureStructure>
      Specified by:
      moveToLast in interface LowLevelIterator
    • moveTo

      public void moveTo(FeatureStructure fs)
      Description copied from interface: FSIterator
      Move the iterator to the first Feature Structure that is equal to fs. First means the earliest one occurring in the index, in case multiple FSs that are "equal" to fs are in the index. If no such feature structure exists in the underlying collection, set the iterator to the "insertion point" for fs, i.e., to a point where the current feature structure is greater than fs, and the previous one is less than fs.

      If the fs is greater than all of the entries in the index, the moveTo cannot set the iterator to an insertion point where the current feature structure is greater than fs, so it marks the iterator "invalid".

      If the underlying index is a bag index, no ordering is present, and the moveTo operation moves to the fs which is the same identical fs as the key. If no such fs is in the index, the iterator is marked invalid.

      Specified by:
      moveTo in interface FSIterator<TI extends FeatureStructure>
      Parameters:
      fs - The feature structure the iterator that supplies the comparison information. It must be of type T or a subtype of T.
    • copy

      Description copied from interface: LowLevelIterator
      Create a copy of this iterator. The copy will point at the same element that this iterator is currently pointing at.
      Specified by:
      copy in interface FSIterator<TI extends FeatureStructure>
      Specified by:
      copy in interface LowLevelIterator
      Returns:
      A copy of this iterator.
    • isUpdateFreeSinceLastCounterReset

      public boolean isUpdateFreeSinceLastCounterReset()
    • 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.
    • moveTo

      public void moveTo(int fsRef)
      Description copied from interface: LowLevelIterator
      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.
      Specified by:
      moveTo in interface LowLevelIterator
      Parameters:
      fsRef - The FS reference the iterator should be set to.
    • ll_indexSize

      public int ll_indexSize()
      Description copied from interface: LowLevelIterator
      Return the size of the underlying index.
      Specified by:
      ll_indexSize in interface LowLevelIterator
      Returns:
      The size of the index.
    • 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.