Interface TaggedUnion<Tag extends java.lang.Enum<?>,​BaseType>

Type Parameters:
Tag - the tag type that defines the possible variants (an enum).
BaseType - the closest common ancestor type to all variant values.
All Known Subinterfaces:
OpenTaggedUnion<Tag,​BaseType>
All Known Implementing Classes:
Action, Action, Aggregate, Aggregation, Analyzer, Buckets, BucketsPath, BulkOperation, CategorizationAnalyzer, CategorizeTextAnalyzer, CharFilter, CharFilterDefinition, ClusterRemoteInfo, Condition, Context, DataframeAnalysis, DataframeAnalysisFeatureProcessor, DataframeAnalyticsStats, DataframeEvaluation, EmailAttachment, FieldDateMath, FieldRule, FieldSuggester, FieldValue, FunctionScore, GeoBounds, GeoHashPrecision, GeoLocation, InferenceConfig, InferenceConfig, InferenceConfigCreate, InferenceConfigUpdate, Input, Intervals, IntervalsFilter, IntervalsQuery, LifecycleExplain, Like, MovingAverageAggregation, MultiGetResponseItem, MultiSearchResponseItem, NodeReloadResult, Normalizer, Percentiles, PinnedQuery, PivotGroupBy, Preprocessor, Processor, Property, Query, RetentionPolicy, RoleMappingRule, RoleTemplateInlineQuery, RoleTemplateScript, Schedule, ScheduleTimeOfDay, Script, SimpleQueryStringFlags, Slices, SmoothingModel, SortOptions, SourceConfig, SourceConfigParam, SpanQuery, Suggestion, Sync, TaskInfos, TermsExclude, TermsInclude, TermsQueryField, Time, TokenFilter, TokenFilterDefinition, TokenizationConfig, Tokenizer, TokenizerDefinition, TrackHits, Transform, Trigger, TriggerEvent, WaitForActiveShards

public interface TaggedUnion<Tag extends java.lang.Enum<?>,​BaseType>
Base interface for tagged union types (also known as sum types or variants).

It provides access to the current variant kind and its value.

See Also:
Tagged Union on Wikipedia
  • Method Summary

    Modifier and Type Method Description
    BaseType _get()  
    Tag _kind()
    Get the of the kind of variant held by this object.
  • Method Details

    • _kind

      Tag _kind()
      Get the of the kind of variant held by this object.
      Returns:
      the variant kind
    • _get

      BaseType _get()