Package org.apache.uima.cas.impl
Class FSIteratorImplBase<T extends FeatureStructure>
- java.lang.Object
-
- org.apache.uima.cas.impl.FSIteratorImplBase<T>
-
- All Implemented Interfaces:
java.util.Iterator<T>
,java.util.ListIterator<T>
,FSIterator<T>
,LowLevelIterator<T>
public abstract class FSIteratorImplBase<T extends FeatureStructure> extends java.lang.Object implements LowLevelIterator<T>
Version 2 compatibility only, not used internally in version 3 Base class for FSIterator implementations. Defines the hasNext, next, and remove methods required by java.util.Iterator. Users writing their own iterator implementations may extend this class
-
-
Field Summary
-
Fields inherited from interface org.apache.uima.cas.impl.LowLevelIterator
FS_ITERATOR_LOW_LEVEL_EMPTY, IS_ORDERED
-
-
Constructor Summary
Constructors Constructor Description FSIteratorImplBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) int
getBegin()
java.util.Comparator<TOP>
getComparator()
default implementation of getComparator(package private) int
getEnd()
boolean
hasNext()
DEFAULT implementations of Iterator interface in terms of FSIterator methods(package private) <TT extends AnnotationFS>
voidmoveTo(int begin, int end)
A special version of moveTo for subtypes of AnnotationFS, which moves to a particular begin/end (no type priority).T
next()
void
remove()
Removes from all the indexes associated with this view, the "current" Feature Structure (the one that would be returned by a "get()" operation).-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.uima.cas.FSIterator
add, copy, get, getNvc, getType, hasPrevious, isValid, moveToNext, moveToNextNvc, moveToPrevious, moveToPreviousNvc, nextIndex, nextNvc, previous, previousIndex, previousNvc, set, size, spliterator, stream
-
Methods inherited from interface org.apache.uima.cas.impl.LowLevelIterator
getArrayList, isIndexesHaveBeenUpdated, isMoveToSupported, ll_get, ll_getIndex, ll_indexSizeMaybeNotCurrent, ll_maxAnnotSpan, ll_remove, maybeReinitIterator, moveTo, moveTo, moveToFirst, moveToFirstNoReinit, moveToLast, moveToLastNoReinit, moveToNoReinit
-
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
Description copied from interface:FSIterator
DEFAULT implementations of Iterator interface in terms of FSIterator methods- Specified by:
hasNext
in interfaceFSIterator<T extends FeatureStructure>
- Specified by:
hasNext
in interfacejava.util.Iterator<T extends FeatureStructure>
- Specified by:
hasNext
in interfacejava.util.ListIterator<T extends FeatureStructure>
-
next
public T next()
- Specified by:
next
in interfaceFSIterator<T extends FeatureStructure>
- Specified by:
next
in interfacejava.util.Iterator<T extends FeatureStructure>
- Specified by:
next
in interfacejava.util.ListIterator<T extends FeatureStructure>
-
remove
public void remove()
Description copied from interface:FSIterator
Removes from all the indexes associated with this view, the "current" Feature Structure (the one that would be returned by a "get()" operation).- Specified by:
remove
in interfaceFSIterator<T extends FeatureStructure>
- Specified by:
remove
in interfacejava.util.Iterator<T extends FeatureStructure>
- Specified by:
remove
in interfacejava.util.ListIterator<T extends FeatureStructure>
-
getBegin
int getBegin()
-
getEnd
int getEnd()
-
moveTo
<TT extends AnnotationFS> void moveTo(int begin, int end)
A special version of moveTo for subtypes of AnnotationFS, which moves to a particular begin/end (no type priority).- Parameters:
begin
- the starting point (inclusive)end
- the ending point (inclusive)
-
getComparator
public java.util.Comparator<TOP> getComparator()
default implementation of getComparator- Specified by:
getComparator
in interfaceLowLevelIterator<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.
-
-