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 java.lang.Object
A builder of facet result. This is not thread-safe.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description FacetResult.Builder
addValue(FacetResultValue value)
Add a value to this facet result.FacetResult
build()
Builds a facet result.FacetResult.Builder
setName(java.lang.String name)
Sets the name of this facet result that is a single facet name.
-
-
-
Method Detail
-
setName
public FacetResult.Builder setName(java.lang.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:
java.lang.NullPointerException
- if the name is null.java.lang.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:
java.lang.NullPointerException
- if the name is null.java.lang.IllegalArgumentException
- if the name is empty or null.
-
-