public static class FSIndexFlat.FSIteratorFlat<TI extends FeatureStructure> extends FSIteratorImplBase<TI> implements LowLevelIterator
Modifier and Type | Method and Description |
---|---|
FSIndexFlat.FSIteratorFlat<TI> |
copy()
Create a copy of this iterator.
|
TI |
get()
Get the structure the iterator is pointing at.
|
boolean |
isUpdateFreeSinceLastCounterReset() |
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(FeatureStructure fs)
Move the iterator to the first Feature Structure that is equal to
fs . |
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.
|
TI |
next() |
String |
toString() |
hasNext, remove
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEachRemaining
public TI next()
next
in interface Iterator<TI extends FeatureStructure>
next
in class FSIteratorImplBase<TI extends FeatureStructure>
public boolean isValid()
LowLevelIterator
isValid
in interface FSIterator<TI extends FeatureStructure>
isValid
in interface LowLevelIterator
true
iff the iterator is valid.public TI get() throws NoSuchElementException
FSIterator
get
in interface FSIterator<TI extends FeatureStructure>
NoSuchElementException
- If the iterator is not valid.public void moveToNext()
LowLevelIterator
moveToNext
in interface FSIterator<TI extends FeatureStructure>
moveToNext
in interface LowLevelIterator
public void moveToPrevious()
LowLevelIterator
moveToPrevious
in interface FSIterator<TI extends FeatureStructure>
moveToPrevious
in interface LowLevelIterator
public void moveToFirst()
LowLevelIterator
isValid()
will succeed
iff the index is non-empty.moveToFirst
in interface FSIterator<TI extends FeatureStructure>
moveToFirst
in interface LowLevelIterator
public void moveToLast()
LowLevelIterator
isValid()
will succeed
iff the index is non-empty.moveToLast
in interface FSIterator<TI extends FeatureStructure>
moveToLast
in interface LowLevelIterator
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.
moveTo
in interface FSIterator<TI extends FeatureStructure>
fs
- The feature structure the iterator that supplies the
comparison information. It must be of type T or a subtype of T.public FSIndexFlat.FSIteratorFlat<TI> copy()
LowLevelIterator
copy
in interface FSIterator<TI extends FeatureStructure>
copy
in interface LowLevelIterator
public boolean isUpdateFreeSinceLastCounterReset()
public int ll_get() throws NoSuchElementException
LowLevelIterator
ll_get
in interface LowLevelIterator
NoSuchElementException
- Iff the iterator is not valid.public void moveTo(int fsRef)
LowLevelIterator
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.moveTo
in interface LowLevelIterator
fsRef
- The FS reference the iterator should be set to.public int ll_indexSize()
LowLevelIterator
ll_indexSize
in interface LowLevelIterator
public LowLevelIndex ll_getIndex()
LowLevelIterator
ll_getIndex
in interface LowLevelIterator
Copyright © 2006–2021 The Apache Software Foundation. All rights reserved.