Interface Suggestion


public interface Suggestion
Suggestion
Example to create an instance using the builder pattern

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

    • getText

      @NotNull @NotNull String getText()

      The suggested text.

      Returns:
      text
    • setText

      void setText(String text)

      The suggested text.

      Parameters:
      text - value to be set
    • of

      static Suggestion of()
      factory method
      Returns:
      instance of Suggestion
    • of

      static Suggestion of(Suggestion template)
      factory method to create a shallow copy Suggestion
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static Suggestion deepCopy(@Nullable Suggestion template)
      factory method to create a deep copy of Suggestion
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static SuggestionBuilder builder()
      builder factory method for Suggestion
      Returns:
      builder
    • builder

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

      default <T> T withSuggestion(Function<Suggestion,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<Suggestion> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference