public class FSIteratorWrapper<T extends FeatureStructure> extends FSIteratorImplBase<T>
Modifier and Type | Method and Description |
---|---|
FSIterator<T> |
copy()
Copy this iterator.
|
T |
get()
Get the structure the iterator is pointing at.
|
boolean |
isValid()
Check if this iterator is valid.
|
void |
moveTo(FeatureStructure fs)
Move the iterator to the first Feature Structure that is equal to
fs . |
void |
moveToFirst()
Move the iterator to the first element.
|
void |
moveToLast()
Move the iterator to the last element.
|
void |
moveToNext()
Advance the iterator.
|
void |
moveToPrevious()
Move the iterator one element back.
|
String |
toString() |
hasNext, next, remove
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEachRemaining
public boolean isValid()
FSIterator
true
if the iterator is valid.FSIterator.isValid()
public T get()
FSIterator
FSIterator.get()
public void moveToNext()
FSIterator
FSIterator.moveToNext()
public void moveToPrevious()
FSIterator
FSIterator.moveToPrevious()
public void moveToFirst()
FSIterator
FSIterator.moveToFirst()
public void moveToLast()
FSIterator
FSIterator.moveToLast()
public FSIterator<T> copy()
FSIterator
FSIterator.copy()
public void moveTo(FeatureStructure fs)
FSIterator
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.
fs
- The feature structure the iterator that supplies the
comparison information. It must be of type T or a subtype of T.FSIterator.moveTo(FeatureStructure)
Copyright © 2006–2021 The Apache Software Foundation. All rights reserved.