Interface CustomTokenizer

All Superinterfaces:
SuggestTokenizer

public interface CustomTokenizer extends SuggestTokenizer

Define arbitrary tokens that are used to match the input.


Example to create an instance using the builder pattern

     CustomTokenizer customTokenizer = CustomTokenizer.builder()
             .plusInputs(inputsBuilder -> inputsBuilder)
             .build()
 
  • Field Details

  • Method Details

    • getInputs

      @NotNull @NotNull List<String> getInputs()

      Contains custom tokens.

      Returns:
      inputs
    • setInputs

      void setInputs(String... inputs)

      Contains custom tokens.

      Parameters:
      inputs - values to be set
    • setInputs

      void setInputs(List<String> inputs)

      Contains custom tokens.

      Parameters:
      inputs - values to be set
    • of

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

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

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

      static CustomTokenizerBuilder builder()
      builder factory method for CustomTokenizer
      Returns:
      builder
    • builder

      static CustomTokenizerBuilder builder(CustomTokenizer template)
      create builder for CustomTokenizer instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withCustomTokenizer

      default <T> T withCustomTokenizer(Function<CustomTokenizer,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<CustomTokenizer> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference