Class SuggestionBuilder

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

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

     Suggestion suggestion = Suggestion.builder()
             .text("{text}")
             .build()
 
  • Constructor Details

    • SuggestionBuilder

      public SuggestionBuilder()
  • Method Details

    • text

      public SuggestionBuilder text(String text)

      The suggested text.

      Parameters:
      text - value to be set
      Returns:
      Builder
    • getText

      public String getText()

      The suggested text.

      Returns:
      text
    • build

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

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

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

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