- java.lang.Object
-
- org.apache.lucene.index.IndexReaderContext
-
- org.apache.lucene.index.LeafReaderContext
-
public final class LeafReaderContext extends IndexReaderContext
IndexReaderContext
forLeafReader
instances.
-
-
Field Summary
Fields Modifier and Type Field Description int
docBase
The reader's absolute doc baseprivate java.util.List<LeafReaderContext>
leaves
int
ord
The reader's ord in the top-level's leaves arrayprivate LeafReader
reader
-
Fields inherited from class org.apache.lucene.index.IndexReaderContext
docBaseInParent, identity, isTopLevel, ordInParent, parent
-
-
Constructor Summary
Constructors Constructor Description LeafReaderContext(CompositeReaderContext parent, LeafReader reader, int ord, int docBase, int leafOrd, int leafDocBase)
Creates a newLeafReaderContext
LeafReaderContext(LeafReader leafReader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<IndexReaderContext>
children()
Returns the context's children iff this context is a composite context otherwisenull
.java.util.List<LeafReaderContext>
leaves()
Returns the context's leaves if this context is a top-level context.LeafReader
reader()
Returns theIndexReader
, this context represents.java.lang.String
toString()
-
Methods inherited from class org.apache.lucene.index.IndexReaderContext
id
-
-
-
-
Field Detail
-
ord
public final int ord
The reader's ord in the top-level's leaves array
-
docBase
public final int docBase
The reader's absolute doc base
-
reader
private final LeafReader reader
-
leaves
private final java.util.List<LeafReaderContext> leaves
-
-
Constructor Detail
-
LeafReaderContext
LeafReaderContext(CompositeReaderContext parent, LeafReader reader, int ord, int docBase, int leafOrd, int leafDocBase)
Creates a newLeafReaderContext
-
LeafReaderContext
LeafReaderContext(LeafReader leafReader)
-
-
Method Detail
-
leaves
public java.util.List<LeafReaderContext> leaves()
Description copied from class:IndexReaderContext
Returns the context's leaves if this context is a top-level context. For convenience, if this is anLeafReaderContext
this returns itself as the only leaf, and it will never return a null value.Note: this is convenience method since leaves can always be obtained by walking the context tree using
IndexReaderContext.children()
.- Specified by:
leaves
in classIndexReaderContext
- See Also:
IndexReaderContext.children()
-
children
public java.util.List<IndexReaderContext> children()
Description copied from class:IndexReaderContext
Returns the context's children iff this context is a composite context otherwisenull
.- Specified by:
children
in classIndexReaderContext
-
reader
public LeafReader reader()
Description copied from class:IndexReaderContext
Returns theIndexReader
, this context represents.- Specified by:
reader
in classIndexReaderContext
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-