Class FacetResult.Builder (2.0.0)

public static final class FacetResult.Builder

A builder of facet result. This is not thread-safe.

Inheritance

java.lang.Object > FacetResult.Builder

Methods

addValue(FacetResultValue value)

public FacetResult.Builder addValue(FacetResultValue value)

Add a value to this facet result.

Parameter
NameDescription
valueFacetResultValue

the value to add.

Returns
TypeDescription
FacetResult.Builder

this builder

build()

public FacetResult build()

Builds a facet result. The builder must at least have a name.

Returns
TypeDescription
FacetResult

the facet result built by this builder

setName(String name)

public FacetResult.Builder setName(String name)

Sets the name of this facet result that is a single facet name.

Parameter
NameDescription
nameString

The name of the facet for this facet result.

Returns
TypeDescription
FacetResult.Builder

this builder