Package org.apache.lucene.codecs
Class MutablePointTree
- java.lang.Object
-
- org.apache.lucene.codecs.MutablePointTree
-
- All Implemented Interfaces:
Cloneable,PointValues.PointTree
public abstract class MutablePointTree extends Object implements PointValues.PointTree
One leafPointValues.PointTreewhose 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
Constructors Modifier Constructor Description protectedMutablePointTree()Sole constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description PointValues.PointTreeclone()Clone, the current node becomes the root of the new tree.abstract bytegetByteAt(int i, int k)Get the k-th byte of the i-th value.abstract intgetDocID(int i)Return the doc ID of the i-th value.byte[]getMaxPackedValue()Return the maximum packed value of the current node.byte[]getMinPackedValue()Return the minimum packed value of the current node.abstract voidgetValue(int i, BytesRef packedValue)SetpackedValuewith a reference to the packed bytes of the i-th value.booleanmoveToChild()Move to the first child node and returntrueupon success.booleanmoveToParent()Move to the parent node and returntrueupon success.booleanmoveToSibling()Move to the next sibling node and returntrueupon success.abstract voidrestore(int i, int j)Restore values between i-th and j-th(excluding) in temporary storage into original storage.abstract voidsave(int i, int j)Save the i-th value into the j-th position in temporary storage.abstract voidswap(int i, int j)Swap the i-th and j-th values.voidvisitDocIDs(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
-
-
-
-
Method Detail
-
getValue
public abstract void getValue(int i, BytesRef packedValue)SetpackedValuewith 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
public final PointValues.PointTree clone()
Description copied from interface:PointValues.PointTreeClone, the current node becomes the root of the new tree.- Specified by:
clonein interfacePointValues.PointTree- Overrides:
clonein classObject
-
moveToChild
public final boolean moveToChild()
Description copied from interface:PointValues.PointTreeMove to the first child node and returntrueupon success. Returnsfalsefor leaf nodes andtrueotherwise.- Specified by:
moveToChildin interfacePointValues.PointTree
-
moveToSibling
public final boolean moveToSibling()
Description copied from interface:PointValues.PointTreeMove to the next sibling node and returntrueupon success. Returnsfalseif the current node has no more siblings.- Specified by:
moveToSiblingin interfacePointValues.PointTree
-
moveToParent
public final boolean moveToParent()
Description copied from interface:PointValues.PointTreeMove to the parent node and returntrueupon success. Returnsfalsefor the root node andtrueotherwise.- Specified by:
moveToParentin interfacePointValues.PointTree
-
getMinPackedValue
public byte[] getMinPackedValue()
Description copied from interface:PointValues.PointTreeReturn the minimum packed value of the current node.- Specified by:
getMinPackedValuein interfacePointValues.PointTree
-
getMaxPackedValue
public byte[] getMaxPackedValue()
Description copied from interface:PointValues.PointTreeReturn the maximum packed value of the current node.- Specified by:
getMaxPackedValuein interfacePointValues.PointTree
-
visitDocIDs
public void visitDocIDs(PointValues.IntersectVisitor visitor)
Description copied from interface:PointValues.PointTreeVisit all the docs below the current node.- Specified by:
visitDocIDsin interfacePointValues.PointTree
-
-