Package org.apache.lucene.facet.range
Record Class DynamicRangeUtil.DynamicRangeInfo
java.lang.Object
java.lang.Record
org.apache.lucene.facet.range.DynamicRangeUtil.DynamicRangeInfo
- Record Components:
count- the number of items in the rangeweight- the summed weight of the items in the rangemin- the lower bound of the range (inclusive)max- the upper bound of the range (inclusive)centroid- the average value in the range
- Enclosing class:
DynamicRangeUtil
public static record DynamicRangeUtil.DynamicRangeInfo(int count, long weight, long min, long max, double centroid)
extends Record
Holds parameters of a dynamic numeric range.
-
Constructor Summary
ConstructorsConstructorDescriptionDynamicRangeInfo(int count, long weight, long min, long max, double centroid) Creates an instance of aDynamicRangeInforecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoublecentroid()Returns the value of thecentroidrecord component.intcount()Returns the value of thecountrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longmax()Returns the value of themaxrecord component.longmin()Returns the value of theminrecord component.final StringtoString()Returns a string representation of this record class.longweight()Returns the value of theweightrecord component.
-
Constructor Details
-
DynamicRangeInfo
public DynamicRangeInfo(int count, long weight, long min, long max, double centroid) Creates an instance of aDynamicRangeInforecord class.
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
count
public int count()Returns the value of thecountrecord component.- Returns:
- the value of the
countrecord component
-
weight
public long weight()Returns the value of theweightrecord component.- Returns:
- the value of the
weightrecord component
-
min
public long min()Returns the value of theminrecord component.- Returns:
- the value of the
minrecord component
-
max
public long max()Returns the value of themaxrecord component.- Returns:
- the value of the
maxrecord component
-
centroid
public double centroid()Returns the value of thecentroidrecord component.- Returns:
- the value of the
centroidrecord component
-