DoubleRangeFactory (Lucene 10.5.0 grouping API)
Description: declaration: package: org.apache.lucene.search.grouping, class: DoubleRangeFactory

Package org.apache.lucene.search.grouping

# Class DoubleRangeFactory

java.lang.Object
org.apache.lucene.search.grouping.DoubleRangeFactory

public class DoubleRangeFactory extends Object
Groups double values into ranges

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DoubleRangeFactory(double min, double width, double max)`
  Creates a new DoubleRangeFactory

- ## Method Summary

  Modifier and Type
  Method
  Description
  `DoubleRange`
  `getRange(double value, DoubleRange reuse)`
  Finds the DoubleRange that a value should be grouped into

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

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### DoubleRangeFactory

    public DoubleRangeFactory(double min, double width, double max)
    Creates a new DoubleRangeFactory
    Parameters:
      `min` - a minimum value; all doubles below this value are grouped into a single range
      `width` - a standard width; all ranges between `min` and `max` are this wide, with the exception of the final range which may be up to this width. Ranges are inclusive at the lower end, and exclusive at the upper end.
      `max` - a maximum value; all doubles above this value are grouped into a single range

- ## Method Details

  - ### getRange

    public DoubleRange getRange(double value, DoubleRange reuse)
    Finds the DoubleRange that a value should be grouped into
    Parameters:
      `value` - the value to group
      `reuse` - an existing DoubleRange object to reuse