Class SuggestionBuilder
java.lang.Object
com.commercetools.api.models.product.SuggestionBuilder
- All Implemented Interfaces:
Builder<Suggestion>
SuggestionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
Suggestion suggestion = Suggestion.builder()
.text("{text}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds Suggestion with checking for non-null required valuesbuilds Suggestion without checking for non-null required valuesgetText()
The suggested text.static SuggestionBuilder
of()
factory method for an instance of SuggestionBuilderstatic SuggestionBuilder
of
(Suggestion template) create builder for Suggestion instanceThe suggested text.
-
Constructor Details
-
SuggestionBuilder
public SuggestionBuilder()
-
-
Method Details
-
text
The suggested text.
- Parameters:
text
- value to be set- Returns:
- Builder
-
getText
The suggested text.
- Returns:
- text
-
build
builds Suggestion with checking for non-null required values- Specified by:
build
in interfaceBuilder<Suggestion>
- Returns:
- Suggestion
-
buildUnchecked
builds Suggestion without checking for non-null required values- Returns:
- Suggestion
-
of
factory method for an instance of SuggestionBuilder- Returns:
- builder
-
of
create builder for Suggestion instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-