Class SearchKeywordBuilder
java.lang.Object
com.commercetools.history.models.common.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}")
.suggestTokenizer(suggestTokenizerBuilder -> suggestTokenizerBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds SearchKeyword with checking for non-null required valuesbuilds SearchKeyword without checking for non-null required valuesvalue of suggestTokenizer}getText()
value of text}static SearchKeywordBuilder
of()
factory method for an instance of SearchKeywordBuilderstatic SearchKeywordBuilder
of
(SearchKeyword template) create builder for SearchKeyword instancesuggestTokenizer
(SuggestTokenizer suggestTokenizer) set the value to the suggestTokenizerset the value to the suggestTokenizer using the builder functionset the value to the textset the value to the suggestTokenizer using the builder function
-
Constructor Details
-
SearchKeywordBuilder
public SearchKeywordBuilder()
-
-
Method Details
-
text
set the value to the text- Parameters:
text
- value to be set- Returns:
- Builder
-
suggestTokenizer
public SearchKeywordBuilder suggestTokenizer(Function<SuggestTokenizerBuilder, SuggestTokenizerBuilder> builder) set the value to the suggestTokenizer using the builder function- Parameters:
builder
- function to build the suggestTokenizer value- Returns:
- Builder
-
withSuggestTokenizer
public SearchKeywordBuilder withSuggestTokenizer(Function<SuggestTokenizerBuilder, SuggestTokenizer> builder) set the value to the suggestTokenizer using the builder function- Parameters:
builder
- function to build the suggestTokenizer value- Returns:
- Builder
-
suggestTokenizer
set the value to the suggestTokenizer- Parameters:
suggestTokenizer
- value to be set- Returns:
- Builder
-
getText
value of text}- Returns:
- text
-
getSuggestTokenizer
value of suggestTokenizer}- 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
-