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 range
  `weight` - the summed weight of the items in the range
  `min` - 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

Constructors
Constructor
Description
`DynamicRangeInfo(int count, long weight, long min, long max, double centroid)`
Creates an instance of a `DynamicRangeInfo` record class.

## Method Summary

Modifier and Type
Method
Description
`double`
`centroid()`
Returns the value of the `centroid` record component.
`int`
`count()`
Returns the value of the `count` record component.
`final boolean`
`equals(Object o)`
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 the `max` record component.
`long`
`min()`
Returns the value of the `min` record component.
`final String`
`toString()`
Returns a string representation of this record class.
`long`
`weight()`
Returns the value of the `weight` record component.

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Constructor Details

### DynamicRangeInfo

public DynamicRangeInfo(int count, long weight, long min, long max, double centroid)
Creates an instance of a `DynamicRangeInfo` record class.

Parameters:
  `count` - the value for the `count` record component
  `weight` - the value for the `weight` record component
  `min` - the value for the `min` record component
  `max` - the value for the `max` record component
  `centroid` - the value for the `centroid` record component

## Method Details

### toString

public final String 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.

Specified by:
  `toString` in class `Record`
Returns:
  a string representation of this object

### 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.

Specified by:
  `hashCode` in class `Record`
Returns:
  a hash code value for this object

### equals

public final boolean equals(Object o)
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 '=='.

Specified by:
  `equals` in class `Record`
Parameters:
  `o` - the object with which to compare
Returns:
  `true` if this object is the same as the `o` argument; `false` otherwise.

### count

public int count()
Returns the value of the `count` record component.

Returns:
  the value of the `count` record component

### weight

public long weight()
Returns the value of the `weight` record component.

Returns:
  the value of the `weight` record component

### min

public long min()
Returns the value of the `min` record component.

Returns:
  the value of the `min` record component

### max

public long max()
Returns the value of the `max` record component.

Returns:
  the value of the `max` record component

### centroid

public double centroid()
Returns the value of the `centroid` record component.

Returns:
  the value of the `centroid` record component