Class SuggestionResultBuilder
java.lang.Object
com.commercetools.api.models.product.SuggestionResultBuilder
- All Implemented Interfaces:
Builder<SuggestionResult>
SuggestionResultBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
SuggestionResult suggestionResult = SuggestionResult.builder()
.plus/searchKeywords.[a-z]{2}(-[A-Z]{2})?/(/searchKeywords.[a-z]{2}(-[A-Z]{2})?/Builder -> /searchKeywords.[a-z]{2}(-[A-Z]{2})?/Builder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddValue
(String key, List<Suggestion> value) The result may contain multiple Suggestions identified by their Locale.build()
builds SuggestionResult with checking for non-null required valuesbuilds SuggestionResult without checking for non-null required valuesThe result may contain multiple Suggestions identified by their Locale.static SuggestionResultBuilder
of()
factory method for an instance of SuggestionResultBuilderstatic SuggestionResultBuilder
of
(SuggestionResult template) create builder for SuggestionResult instancevalues
(Map<String, List<Suggestion>> values) The result may contain multiple Suggestions identified by their Locale.
-
Constructor Details
-
SuggestionResultBuilder
public SuggestionResultBuilder()
-
-
Method Details
-
values
The result may contain multiple Suggestions identified by their Locale. See Suggestions for two languages.
- Parameters:
values
- properties to be set- Returns:
- Builder
-
addValue
The result may contain multiple Suggestions identified by their Locale. See Suggestions for two languages.
- Parameters:
key
- property namevalue
- property value- Returns:
- Builder
-
getValues
The result may contain multiple Suggestions identified by their Locale. See Suggestions for two languages.
- Returns:
- pattern properties
-
build
builds SuggestionResult with checking for non-null required values- Specified by:
build
in interfaceBuilder<SuggestionResult>
- Returns:
- SuggestionResult
-
buildUnchecked
builds SuggestionResult without checking for non-null required values- Returns:
- SuggestionResult
-
of
factory method for an instance of SuggestionResultBuilder- Returns:
- builder
-
of
create builder for SuggestionResult instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-