Class SearchKeywordBuilder
java.lang.Object
com.commercetools.api.models.product.SearchKeywordBuilder
- All Implemented Interfaces:
Builder<SearchKeyword>
SearchKeywordBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
SearchKeyword searchKeyword = SearchKeyword.builder()
.text("{text}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds SearchKeyword with checking for non-null required valuesbuilds SearchKeyword without checking for non-null required valuesIf no tokenizer is defined, thetext
is used as a single token.getText()
Text to return in the SuggestionResult.static SearchKeywordBuilder
of()
factory method for an instance of SearchKeywordBuilderstatic SearchKeywordBuilder
of
(SearchKeyword template) create builder for SearchKeyword instancesuggestTokenizer
(SuggestTokenizer suggestTokenizer) If no tokenizer is defined, thetext
is used as a single token.suggestTokenizer
(Function<SuggestTokenizerBuilder, Builder<? extends SuggestTokenizer>> builder) If no tokenizer is defined, thetext
is used as a single token.Text to return in the SuggestionResult.
-
Constructor Details
-
SearchKeywordBuilder
public SearchKeywordBuilder()
-
-
Method Details
-
text
Text to return in the SuggestionResult.
- Parameters:
text
- value to be set- Returns:
- Builder
-
suggestTokenizer
If no tokenizer is defined, the
text
is used as a single token.- Parameters:
suggestTokenizer
- value to be set- Returns:
- Builder
-
suggestTokenizer
public SearchKeywordBuilder suggestTokenizer(Function<SuggestTokenizerBuilder, Builder<? extends SuggestTokenizer>> builder) If no tokenizer is defined, the
text
is used as a single token.- Parameters:
builder
- function to build the suggestTokenizer value- Returns:
- Builder
-
getText
Text to return in the SuggestionResult.
- Returns:
- text
-
getSuggestTokenizer
If no tokenizer is defined, the
text
is used as a single token.- Returns:
- suggestTokenizer
-
build
builds SearchKeyword with checking for non-null required values- Specified by:
build
in interfaceBuilder<SearchKeyword>
- Returns:
- SearchKeyword
-
buildUnchecked
builds SearchKeyword without checking for non-null required values- Returns:
- SearchKeyword
-
of
factory method for an instance of SearchKeywordBuilder- Returns:
- builder
-
of
create builder for SearchKeyword instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-