Class TermFacetResultBuilder
java.lang.Object
com.commercetools.api.models.product.TermFacetResultBuilder
- All Implemented Interfaces:
Builder<TermFacetResult>
TermFacetResultBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
TermFacetResult termFacetResult = TermFacetResult.builder()
.dataType(TermFacetResultType.TEXT)
.missing(0.3)
.total(0.3)
.other(0.3)
.plusTerms(termsBuilder -> termsBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddTerms
(Function<FacetTermBuilder, FacetTerm> builder) add the value to the terms using the builder functionbuild()
builds TermFacetResult with checking for non-null required valuesbuilds TermFacetResult without checking for non-null required valuesdataType
(TermFacetResultType dataType) set the value to the dataTypevalue of dataType}value of missing}getOther()
value of other}getTerms()
value of terms}getTotal()
value of total}set the value to the missingstatic TermFacetResultBuilder
of()
factory method for an instance of TermFacetResultBuilderstatic TermFacetResultBuilder
of
(TermFacetResult template) create builder for TermFacetResult instanceset the value to the otheradd values to the termsplusTerms
(Function<FacetTermBuilder, FacetTermBuilder> builder) add the value to the terms using the builder functionsetTerms
(Function<FacetTermBuilder, FacetTerm> builder) set the value to the terms using the builder functionset values to the termsset value to the termsset the value to the totalwithTerms
(Function<FacetTermBuilder, FacetTermBuilder> builder) set the value to the terms using the builder function
-
Constructor Details
-
TermFacetResultBuilder
public TermFacetResultBuilder()
-
-
Method Details
-
dataType
set the value to the dataType- Parameters:
dataType
- value to be set- Returns:
- Builder
-
missing
set the value to the missing- Parameters:
missing
- value to be set- Returns:
- Builder
-
total
set the value to the total- Parameters:
total
- value to be set- Returns:
- Builder
-
other
set the value to the other- Parameters:
other
- value to be set- Returns:
- Builder
-
terms
set values to the terms- Parameters:
terms
- value to be set- Returns:
- Builder
-
terms
set value to the terms- Parameters:
terms
- value to be set- Returns:
- Builder
-
plusTerms
add values to the terms- Parameters:
terms
- value to be set- Returns:
- Builder
-
plusTerms
add the value to the terms using the builder function- Parameters:
builder
- function to build the terms value- Returns:
- Builder
-
withTerms
set the value to the terms using the builder function- Parameters:
builder
- function to build the terms value- Returns:
- Builder
-
addTerms
add the value to the terms using the builder function- Parameters:
builder
- function to build the terms value- Returns:
- Builder
-
setTerms
set the value to the terms using the builder function- Parameters:
builder
- function to build the terms value- Returns:
- Builder
-
getDataType
value of dataType}- Returns:
- dataType
-
getMissing
value of missing}- Returns:
- missing
-
getTotal
value of total}- Returns:
- total
-
getOther
value of other}- Returns:
- other
-
getTerms
value of terms}- Returns:
- terms
-
build
builds TermFacetResult with checking for non-null required values- Specified by:
build
in interfaceBuilder<TermFacetResult>
- Returns:
- TermFacetResult
-
buildUnchecked
builds TermFacetResult without checking for non-null required values- Returns:
- TermFacetResult
-
of
factory method for an instance of TermFacetResultBuilder- Returns:
- builder
-
of
create builder for TermFacetResult instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-