Package org.apache.lucene.codecs
Class MutablePointTree
java.lang.Object
org.apache.lucene.codecs.MutablePointTree
- All Implemented Interfaces:
Cloneable
,PointValues.PointTree
One leaf
PointValues.PointTree
whose order of points can be changed. This class is useful for codecs
to optimize flush.- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal PointValues.PointTree
clone()
Clone, the current node becomes the root of the new tree.abstract byte
getByteAt
(int i, int k) Get the k-th byte of the i-th value.abstract int
getDocID
(int i) Return the doc ID of the i-th value.byte[]
Return the maximum packed value of the current node.byte[]
Return the minimum packed value of the current node.abstract void
SetpackedValue
with a reference to the packed bytes of the i-th value.final boolean
Move to the first child node and returntrue
upon success.final boolean
Move to the parent node and returntrue
upon success.final boolean
Move to the next sibling node and returntrue
upon success.abstract void
restore
(int i, int j) Restore values between i-th and j-th(excluding) in temporary storage into original storage.abstract void
save
(int i, int j) Save the i-th value into the j-th position in temporary storage.abstract void
swap
(int i, int j) Swap the i-th and j-th values.void
visitDocIDs
(PointValues.IntersectVisitor visitor) Visit all the docs below the current node.Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.lucene.index.PointValues.PointTree
size, visitDocValues
-
Constructor Details
-
MutablePointTree
protected MutablePointTree()Sole constructor.
-
-
Method Details
-
getValue
SetpackedValue
with a reference to the packed bytes of the i-th value. -
getByteAt
public abstract byte getByteAt(int i, int k) Get the k-th byte of the i-th value. -
getDocID
public abstract int getDocID(int i) Return the doc ID of the i-th value. -
swap
public abstract void swap(int i, int j) Swap the i-th and j-th values. -
save
public abstract void save(int i, int j) Save the i-th value into the j-th position in temporary storage. -
restore
public abstract void restore(int i, int j) Restore values between i-th and j-th(excluding) in temporary storage into original storage. -
clone
Description copied from interface:PointValues.PointTree
Clone, the current node becomes the root of the new tree.- Specified by:
clone
in interfacePointValues.PointTree
- Overrides:
clone
in classObject
-
moveToChild
public final boolean moveToChild()Description copied from interface:PointValues.PointTree
Move to the first child node and returntrue
upon success. Returnsfalse
for leaf nodes andtrue
otherwise.- Specified by:
moveToChild
in interfacePointValues.PointTree
-
moveToSibling
public final boolean moveToSibling()Description copied from interface:PointValues.PointTree
Move to the next sibling node and returntrue
upon success. Returnsfalse
if the current node has no more siblings.- Specified by:
moveToSibling
in interfacePointValues.PointTree
-
moveToParent
public final boolean moveToParent()Description copied from interface:PointValues.PointTree
Move to the parent node and returntrue
upon success. Returnsfalse
for the root node andtrue
otherwise.- Specified by:
moveToParent
in interfacePointValues.PointTree
-
getMinPackedValue
public byte[] getMinPackedValue()Description copied from interface:PointValues.PointTree
Return the minimum packed value of the current node.- Specified by:
getMinPackedValue
in interfacePointValues.PointTree
-
getMaxPackedValue
public byte[] getMaxPackedValue()Description copied from interface:PointValues.PointTree
Return the maximum packed value of the current node.- Specified by:
getMaxPackedValue
in interfacePointValues.PointTree
-
visitDocIDs
Description copied from interface:PointValues.PointTree
Visit all the docs below the current node.- Specified by:
visitDocIDs
in interfacePointValues.PointTree
-