Package org.apache.lucene.index
Class DocValuesFieldUpdates.AbstractIterator
- java.lang.Object
-
- org.apache.lucene.search.DocIdSetIterator
-
- org.apache.lucene.index.DocValuesIterator
-
- org.apache.lucene.index.DocValuesFieldUpdates.Iterator
-
- org.apache.lucene.index.DocValuesFieldUpdates.AbstractIterator
-
- Direct Known Subclasses:
BinaryDocValuesFieldUpdates.Iterator,NumericDocValuesFieldUpdates.Iterator
- Enclosing class:
- DocValuesFieldUpdates
protected abstract static class DocValuesFieldUpdates.AbstractIterator extends DocValuesFieldUpdates.Iterator
-
-
Field Summary
Fields Modifier and Type Field Description private longdelGenprivate intdocprivate PagedMutabledocsprivate booleanhasValueprivate longidxprivate intsize-
Fields inherited from class org.apache.lucene.search.DocIdSetIterator
NO_MORE_DOCS
-
-
Constructor Summary
Constructors Constructor Description AbstractIterator(int size, PagedMutable docs, long delGen)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) longdelGen()Returns delGen for this packet.intdocID()Returns the following:-1ifDocIdSetIterator.nextDoc()orDocIdSetIterator.advance(int)were not called yet.(package private) booleanhasValue()Returns true if this doc has a valueintnextDoc()Advances to the next document in the set and returns the doc it is currently on, orDocIdSetIterator.NO_MORE_DOCSif there are no more docs in the set.
NOTE: after the iterator has exhausted you should not call this method, as it may result in unpredicted behavior.protected abstract voidset(long idx)Called when the iterator moved to the next document-
Methods inherited from class org.apache.lucene.index.DocValuesFieldUpdates.Iterator
advance, advanceExact, asBinaryDocValues, asNumericDocValues, binaryValue, cost, longValue
-
Methods inherited from class org.apache.lucene.search.DocIdSetIterator
all, empty, range, slowAdvance
-
-
-
-
Field Detail
-
size
private final int size
-
docs
private final PagedMutable docs
-
idx
private long idx
-
doc
private int doc
-
delGen
private final long delGen
-
hasValue
private boolean hasValue
-
-
Constructor Detail
-
AbstractIterator
AbstractIterator(int size, PagedMutable docs, long delGen)
-
-
Method Detail
-
nextDoc
public final int nextDoc()
Description copied from class:DocIdSetIteratorAdvances to the next document in the set and returns the doc it is currently on, orDocIdSetIterator.NO_MORE_DOCSif there are no more docs in the set.
NOTE: after the iterator has exhausted you should not call this method, as it may result in unpredicted behavior.- Specified by:
nextDocin classDocValuesFieldUpdates.Iterator
-
set
protected abstract void set(long idx)
Called when the iterator moved to the next document- Parameters:
idx- the internal index to set the value to
-
docID
public final int docID()
Description copied from class:DocIdSetIteratorReturns the following:-1ifDocIdSetIterator.nextDoc()orDocIdSetIterator.advance(int)were not called yet.DocIdSetIterator.NO_MORE_DOCSif the iterator has exhausted.- Otherwise it should return the doc ID it is currently on.
- Specified by:
docIDin classDocIdSetIterator
-
delGen
final long delGen()
Description copied from class:DocValuesFieldUpdates.IteratorReturns delGen for this packet.- Specified by:
delGenin classDocValuesFieldUpdates.Iterator
-
hasValue
final boolean hasValue()
Description copied from class:DocValuesFieldUpdates.IteratorReturns true if this doc has a value- Specified by:
hasValuein classDocValuesFieldUpdates.Iterator
-
-