Class SearchKeywordsBuilder

java.lang.Object
com.commercetools.api.models.product.SearchKeywordsBuilder
All Implemented Interfaces:
Builder<SearchKeywords>

public class SearchKeywordsBuilder extends Object implements Builder<SearchKeywords>
SearchKeywordsBuilder
Example to create an instance using the builder pattern

     SearchKeywords searchKeywords = SearchKeywords.builder()
             .plus/^[a-z]{2}(-[A-Z]{2})?$/(/^[a-z]{2}(-[A-Z]{2})?$/Builder -> /^[a-z]{2}(-[A-Z]{2})?$/Builder)
             .build()
 
  • Constructor Details

    • SearchKeywordsBuilder

      public SearchKeywordsBuilder()
  • Method Details

    • values

      assign pattern properties to the builder
      Parameters:
      values - properties to be set
      Returns:
      Builder
    • addValue

      public SearchKeywordsBuilder addValue(String key, List<SearchKeyword> value)
      assign a pattern property to the builder
      Parameters:
      key - property name
      value - property value
      Returns:
      Builder
    • getValues

      public Map<String,List<SearchKeyword>> getValues()
      values of pattern properties
      Returns:
      pattern properties
    • build

      public SearchKeywords build()
      builds SearchKeywords with checking for non-null required values
      Specified by:
      build in interface Builder<SearchKeywords>
      Returns:
      SearchKeywords
    • buildUnchecked

      public SearchKeywords buildUnchecked()
      builds SearchKeywords without checking for non-null required values
      Returns:
      SearchKeywords
    • of

      public static SearchKeywordsBuilder of()
      factory method for an instance of SearchKeywordsBuilder
      Returns:
      builder
    • of

      public static SearchKeywordsBuilder of(SearchKeywords template)
      create builder for SearchKeywords instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder