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.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final double
    The field for the centroid record component.
    private final int
    The field for the count record component.
    private final long
    The field for the max record component.
    private final long
    The field for the min record component.
    private final long
    The field for the weight record component.
  • 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
    Returns the value of the centroid record component.
    int
    Returns the value of the count record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    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
    Returns a string representation of this record class.
    long
    Returns the value of the weight record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • count

      private final int count
      The field for the count record component.
    • weight

      private final long weight
      The field for the weight record component.
    • min

      private final long min
      The field for the min record component.
    • max

      private final long max
      The field for the max record component.
    • centroid

      private final double centroid
      The field for the centroid record component.
  • 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