Package org.apache.lucene.facet.facetset
Class FloatFacetSet
- java.lang.Object
-
- org.apache.lucene.facet.facetset.FacetSet
-
- org.apache.lucene.facet.facetset.FloatFacetSet
-
-
Constructor Summary
Constructors Constructor Description FloatFacetSet(float... values)Constructs a new instance of a facet set which storesfloatdimension values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long[]getComparableValues()Returns the dimension values in this facet set as comparable longs.intpackValues(byte[] buf, int start)Packs the dimension values into the givenbyte[]and returns the number of packed-values bytes.intsizePackedBytes()Returns the size of the packed values in this facet set.
-
-
-
Method Detail
-
getComparableValues
public long[] getComparableValues()
Description copied from class:FacetSetReturns the dimension values in this facet set as comparable longs.- Specified by:
getComparableValuesin classFacetSet
-
packValues
public int packValues(byte[] buf, int start)Description copied from class:FacetSetPacks the dimension values into the givenbyte[]and returns the number of packed-values bytes. The default implementation packs thecomparable values, and you can override to implement your own scheme.- Overrides:
packValuesin classFacetSet
-
sizePackedBytes
public int sizePackedBytes()
Description copied from class:FacetSetReturns the size of the packed values in this facet set. If the value is unknown in advance (e.g. if the values are compressed), this method can return an upper limit. The default implementations returnsdims * Long.BYTESper the default implementation ofFacetSet.packValues(byte[], int). You should override if you implementFacetSet.packValues(byte[], int)differently.- Overrides:
sizePackedBytesin classFacetSet
-
-