Class TokenizerDefinition

java.lang.Object
co.elastic.clients.elasticsearch._types.analysis.TokenizerDefinition
All Implemented Interfaces:
JsonpSerializable, TaggedUnion<TokenizerDefinition.Kind,​TokenizerDefinitionVariant>

@JsonpDeserializable
public class TokenizerDefinition
extends java.lang.Object
implements TaggedUnion<TokenizerDefinition.Kind,​TokenizerDefinitionVariant>, JsonpSerializable
See Also:
API specification
  • Field Details

  • Constructor Details

  • Method Details

    • _kind

      public final TokenizerDefinition.Kind _kind()
      Description copied from interface: TaggedUnion
      Get the of the kind of variant held by this object.
      Specified by:
      _kind in interface TaggedUnion<TokenizerDefinition.Kind,​TokenizerDefinitionVariant>
      Returns:
      the variant kind
    • _get

      public final TokenizerDefinitionVariant _get()
      Specified by:
      _get in interface TaggedUnion<TokenizerDefinition.Kind,​TokenizerDefinitionVariant>
    • of

      public static TokenizerDefinition of​(java.util.function.Function<TokenizerDefinition.Builder,​ObjectBuilder<TokenizerDefinition>> fn)
    • isCharGroup

      public boolean isCharGroup()
      Is this variant instance of kind char_group?
    • charGroup

      public CharGroupTokenizer charGroup()
      Get the char_group variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the char_group kind.
    • isEdgeNgram

      public boolean isEdgeNgram()
      Is this variant instance of kind edge_ngram?
    • edgeNgram

      public EdgeNGramTokenizer edgeNgram()
      Get the edge_ngram variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the edge_ngram kind.
    • isIcuTokenizer

      public boolean isIcuTokenizer()
      Is this variant instance of kind icu_tokenizer?
    • icuTokenizer

      public IcuTokenizer icuTokenizer()
      Get the icu_tokenizer variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the icu_tokenizer kind.
    • isKeyword

      public boolean isKeyword()
      Is this variant instance of kind keyword?
    • keyword

      public KeywordTokenizer keyword()
      Get the keyword variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the keyword kind.
    • isKuromojiTokenizer

      public boolean isKuromojiTokenizer()
      Is this variant instance of kind kuromoji_tokenizer?
    • kuromojiTokenizer

      public KuromojiTokenizer kuromojiTokenizer()
      Get the kuromoji_tokenizer variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the kuromoji_tokenizer kind.
    • isLetter

      public boolean isLetter()
      Is this variant instance of kind letter?
    • letter

      public LetterTokenizer letter()
      Get the letter variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the letter kind.
    • isLowercase

      public boolean isLowercase()
      Is this variant instance of kind lowercase?
    • lowercase

      public LowercaseTokenizer lowercase()
      Get the lowercase variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the lowercase kind.
    • isNgram

      public boolean isNgram()
      Is this variant instance of kind ngram?
    • ngram

      public NGramTokenizer ngram()
      Get the ngram variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the ngram kind.
    • isNoriTokenizer

      public boolean isNoriTokenizer()
      Is this variant instance of kind nori_tokenizer?
    • noriTokenizer

      public NoriTokenizer noriTokenizer()
      Get the nori_tokenizer variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the nori_tokenizer kind.
    • isPathHierarchy

      public boolean isPathHierarchy()
      Is this variant instance of kind path_hierarchy?
    • pathHierarchy

      public PathHierarchyTokenizer pathHierarchy()
      Get the path_hierarchy variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the path_hierarchy kind.
    • isPattern

      public boolean isPattern()
      Is this variant instance of kind pattern?
    • pattern

      public PatternTokenizer pattern()
      Get the pattern variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the pattern kind.
    • isStandard

      public boolean isStandard()
      Is this variant instance of kind standard?
    • standard

      public StandardTokenizer standard()
      Get the standard variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the standard kind.
    • isUaxUrlEmail

      public boolean isUaxUrlEmail()
      Is this variant instance of kind uax_url_email?
    • uaxUrlEmail

      public UaxEmailUrlTokenizer uaxUrlEmail()
      Get the uax_url_email variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the uax_url_email kind.
    • isWhitespace

      public boolean isWhitespace()
      Is this variant instance of kind whitespace?
    • whitespace

      public WhitespaceTokenizer whitespace()
      Get the whitespace variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the whitespace kind.
    • serialize

      public void serialize​(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Specified by:
      serialize in interface JsonpSerializable
    • setupTokenizerDefinitionDeserializer

      protected static void setupTokenizerDefinitionDeserializer​(ObjectDeserializer<TokenizerDefinition.Builder> op)