PostCollectionFaceting.Result (Lucene 10.5.1 sandbox API)
Description: declaration: package: org.apache.lucene.sandbox.facet.utils, class: PostCollectionFaceting, record: Result

Package org.apache.lucene.sandbox.facet.utils

# Record Class PostCollectionFaceting.Result<T,R>

java.lang.Object
java.lang.Record
org.apache.lucene.sandbox.facet.utils.PostCollectionFaceting.Result<T,R>

Type Parameters:
  `T` - drill down result
  `R` - drill sideways result
Record Components:
  `drillDownResult` - the drill down result
  `drillSidewaysResults` - the drill sideways results

Enclosing class:
  `PostCollectionFaceting<C extends Collector,T,K extends Collector,R>`

public static record PostCollectionFaceting.Result<T,R>(T drillDownResult, Map<String,R> drillSidewaysResults) extends Record
The result. It is very similar to DrillSideways.Result, but it uses Map instead of List for drill sideways results. See also to-do comment in DrillSidewaysFacetOrchestrator.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Result(T drillDownResult, Map<String,R> drillSidewaysResults)`
  Creates an instance of a `Result` record class.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `T`
  `drillDownResult()`
  Returns the value of the `drillDownResult` record component.
  `Map<String,R>`
  `drillSidewaysResults()`
  Returns the value of the `drillSidewaysResults` 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.
  `final String`
  `toString()`
  Returns a string representation of this record class.

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

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

- ## Constructor Details

  - ### Result

    public Result(T drillDownResult, Map<String,R> drillSidewaysResults)
    Creates an instance of a `Result` record class.
    Parameters:
      `drillDownResult` - the value for the `drillDownResult` record component
      `drillSidewaysResults` - the value for the `drillSidewaysResults` 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 `Objects::equals(Object,Object)`.
    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.

  - ### drillDownResult

    public T drillDownResult()
    Returns the value of the `drillDownResult` record component.
    Returns:
      the value of the `drillDownResult` record component

  - ### drillSidewaysResults

    public Map<String,R> drillSidewaysResults()
    Returns the value of the `drillSidewaysResults` record component.
    Returns:
      the value of the `drillSidewaysResults` record component