Class LowLevelIterator_empty<T extends FeatureStructure>

java.lang.Object
org.apache.uima.cas.impl.LowLevelIterator_empty<T>
All Implemented Interfaces:
Iterator<T>, ListIterator<T>, FSIterator<T>, LowLevelIterator<T>

public class LowLevelIterator_empty<T extends FeatureStructure> extends Object implements LowLevelIterator<T>
An empty Low-level FS iterator
  • Constructor Details

    • LowLevelIterator_empty

      public LowLevelIterator_empty()
  • Method Details

    • isValid

      public boolean isValid()
      Description copied from interface: FSIterator
      Check if this iterator is valid.
      Specified by:
      isValid in interface FSIterator<T extends FeatureStructure>
      Returns:
      true if the iterator is valid.
    • getNvc

      public T getNvc()
      Description copied from interface: FSIterator
      Get the structure the iterator is pointing at. Throws various unchecked exceptions, if the iterator is not valid
      Specified by:
      getNvc in interface FSIterator<T extends FeatureStructure>
      Returns:
      The structure the iterator is pointing at.
    • moveToFirstNoReinit

      public void moveToFirstNoReinit()
      Description copied from interface: LowLevelIterator
      Internal use same as moveToFirst, but won't reset to use current contents of index if index has changed
      Specified by:
      moveToFirstNoReinit in interface LowLevelIterator<T extends FeatureStructure>
    • moveToLastNoReinit

      public void moveToLastNoReinit()
      Description copied from interface: LowLevelIterator
      Internal use same as moveToLast, but won't reset to use current contents of index if index has changed
      Specified by:
      moveToLastNoReinit in interface LowLevelIterator<T extends FeatureStructure>
    • moveToNoReinit

      public void moveToNoReinit(FeatureStructure fs)
      Description copied from interface: LowLevelIterator
      Internal use same as moveTo(fs), but won't reset to use current contents of index if index has changed
      Specified by:
      moveToNoReinit in interface LowLevelIterator<T extends FeatureStructure>
      Parameters:
      fs - the fs to use as the template identifying the place to move to
    • copy

      public LowLevelIterator_empty<T> copy()
      Description copied from interface: FSIterator
      Copy this iterator.
      Specified by:
      copy in interface FSIterator<T extends FeatureStructure>
      Returns:
      A copy of this iterator, pointing at the same element.
    • moveToNextNvc

      public void moveToNextNvc()
      Description copied from interface: FSIterator
      version of moveToNext which bypasses the isValid check - call only if you've just done this check yourself
      Specified by:
      moveToNextNvc in interface FSIterator<T extends FeatureStructure>
    • moveToPreviousNvc

      public void moveToPreviousNvc()
      Description copied from interface: FSIterator
      version of moveToPrevious which bypasses the isValid check - call only if you've just done this check yourself
      Specified by:
      moveToPreviousNvc in interface FSIterator<T extends FeatureStructure>
    • ll_indexSizeMaybeNotCurrent

      public int ll_indexSizeMaybeNotCurrent()
      Specified by:
      ll_indexSizeMaybeNotCurrent in interface LowLevelIterator<T extends FeatureStructure>
      Returns:
      The size of the index. In case of copy-on-write, this returns the size of the index at the time the iterator was created, or at the last moveTo, moveToFirst, or moveToLast. To get the current index size, use ll_getIndex().getSize()
    • ll_maxAnnotSpan

      public int ll_maxAnnotSpan()
      Specified by:
      ll_maxAnnotSpan in interface LowLevelIterator<T extends FeatureStructure>
      Returns:
      an estimate of the maximum span over all annotations (end - begin)
    • ll_getIndex

      public LowLevelIndex<T> 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<T extends FeatureStructure>
      Returns:
      The index.
    • isIndexesHaveBeenUpdated

      public boolean isIndexesHaveBeenUpdated()
      Specified by:
      isIndexesHaveBeenUpdated in interface LowLevelIterator<T extends FeatureStructure>
      Returns:
      true if one or more of the underlying indexes this iterator goes over, has been updated since initialization or resetting operation (moveToFirst/Last/feature_structure). This includes empty iterators becoming non-empty.
    • maybeReinitIterator

      public boolean maybeReinitIterator()
      Description copied from interface: LowLevelIterator
      Internal use
      Specified by:
      maybeReinitIterator in interface LowLevelIterator<T extends FeatureStructure>
      Returns:
      true if the iterator was refreshed to match the current index
    • getComparator

      public Comparator<TOP> getComparator()
      Specified by:
      getComparator in interface LowLevelIterator<T extends FeatureStructure>
      Returns:
      the comparator used by this iterator. It is always a withoutID style, and may be either a withType or NoType style.
    • getType

      public Type getType()
      Specified by:
      getType in interface FSIterator<T extends FeatureStructure>
      Returns:
      the type this iterator is over
    • size

      public int size()
      Description copied from interface: FSIterator
      return the size of the collection being iterated over, if available. Because the iterator can move forwards and backwards, the size is the total size that the iterator would iterate over, starting at the first element thru the last element. This may be inefficient to compute.
      Specified by:
      size in interface FSIterator<T extends FeatureStructure>
      Returns:
      the size of the collection being iterated over.