Package com.google.appengine.api.search
Class FacetResult.Builder
- java.lang.Object
-
- com.google.appengine.api.search.FacetResult.Builder
-
- Enclosing class:
- FacetResult
public static final class FacetResult.Builder extends Object
A builder of facet result. This is not thread-safe.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FacetResult.BuilderaddValue(FacetResultValue value)Add a value to this facet result.FacetResultbuild()Builds a facet result.FacetResult.BuildersetName(String name)Sets the name of this facet result that is a single facet name.
-
-
-
Method Detail
-
setName
public FacetResult.Builder setName(String name)
Sets the name of this facet result that is a single facet name.- Parameters:
name- The name of the facet for this facet result.- Returns:
- this builder
- Throws:
NullPointerException- if the name is null.IllegalArgumentException- if the name is empty.
-
addValue
public FacetResult.Builder addValue(FacetResultValue value)
Add a value to this facet result.- Parameters:
value- the value to add.- Returns:
- this builder
-
build
public FacetResult build()
Builds a facet result. The builder must at least have a name.- Returns:
- the facet result built by this builder
- Throws:
NullPointerException- if the name is null.IllegalArgumentException- if the name is empty or null.
-
-