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 aDynamicRangeInfo
record class. -
Method Summary
Modifier and TypeMethodDescriptiondouble
centroid()
Returns the value of thecentroid
record component.int
count()
Returns the value of thecount
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.long
max()
Returns the value of themax
record component.long
min()
Returns the value of themin
record component.final String
toString()
Returns a string representation of this record class.long
weight()
Returns the value of theweight
record component.
-
Constructor Details
-
DynamicRangeInfo
public DynamicRangeInfo(int count, long weight, long min, long max, double centroid) Creates an instance of aDynamicRangeInfo
record 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 thecount
record component.- Returns:
- the value of the
count
record component
-
weight
public long weight()Returns the value of theweight
record component.- Returns:
- the value of the
weight
record component
-
min
public long min()Returns the value of themin
record component.- Returns:
- the value of the
min
record component
-
max
public long max()Returns the value of themax
record component.- Returns:
- the value of the
max
record component
-
centroid
public double centroid()Returns the value of thecentroid
record component.- Returns:
- the value of the
centroid
record component
-