All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.arakelian.elastic.model.ImmutableMapping Maven / Gradle / Ivy

package com.arakelian.elastic.model;

import com.arakelian.core.feature.Nullable;
import com.arakelian.elastic.Views;
import com.arakelian.elastic.doc.filters.TokenFilter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonView;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
import java.io.ObjectStreamException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import javax.annotation.CheckReturnValue;
import javax.annotation.ParametersAreNonnullByDefault;
import javax.annotation.concurrent.Immutable;
import javax.annotation.concurrent.NotThreadSafe;
import org.immutables.value.Generated;

/**
 * Immutable implementation of {@link Mapping}.
 * 

* Use the builder to create immutable instances: * {@code ImmutableMapping.builder()}. */ @Generated(from = "Mapping", generator = "Immutables") @SuppressWarnings({"all"}) @ParametersAreNonnullByDefault @javax.annotation.processing.Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableMapping implements Mapping { private final ImmutableList afterTokenFilters; private final @Nullable Field all; private final ImmutableList beforeTokenFilters; private final @Nullable Mapping.Dynamic dynamic; private final ImmutableList fields; private final ImmutableMap properties; private final @Nullable Field source; private ImmutableMapping(ImmutableMapping.Builder builder) { this.dynamic = builder.dynamic; if (builder.afterTokenFiltersIsSet()) { initShim.afterTokenFilters(builder.afterTokenFilters.build()); } if (builder.allIsSet()) { initShim.all(builder.all); } if (builder.beforeTokenFiltersIsSet()) { initShim.beforeTokenFilters(builder.beforeTokenFilters.build()); } if (builder.fieldsIsSet()) { initShim.fields(builder.fields.build()); } if (builder.propertiesIsSet()) { initShim.properties(builder.properties.build()); } if (builder.sourceIsSet()) { initShim.source(builder.source); } this.afterTokenFilters = initShim.getAfterTokenFilters(); this.all = initShim.getAll(); this.beforeTokenFilters = initShim.getBeforeTokenFilters(); this.fields = initShim.getFields(); this.properties = initShim.getProperties(); this.source = initShim.getSource(); this.initShim = null; } private static final byte STAGE_INITIALIZING = -1; private static final byte STAGE_UNINITIALIZED = 0; private static final byte STAGE_INITIALIZED = 1; @SuppressWarnings("Immutable") private transient volatile InitShim initShim = new InitShim(); @Generated(from = "Mapping", generator = "Immutables") private final class InitShim { private byte afterTokenFiltersBuildStage = STAGE_UNINITIALIZED; private ImmutableList afterTokenFilters; ImmutableList getAfterTokenFilters() { if (afterTokenFiltersBuildStage == STAGE_INITIALIZING) throw new IllegalStateException(formatInitCycleMessage()); if (afterTokenFiltersBuildStage == STAGE_UNINITIALIZED) { afterTokenFiltersBuildStage = STAGE_INITIALIZING; this.afterTokenFilters = ImmutableList.copyOf(getAfterTokenFiltersInitialize()); afterTokenFiltersBuildStage = STAGE_INITIALIZED; } return this.afterTokenFilters; } void afterTokenFilters(ImmutableList afterTokenFilters) { this.afterTokenFilters = afterTokenFilters; afterTokenFiltersBuildStage = STAGE_INITIALIZED; } private byte allBuildStage = STAGE_UNINITIALIZED; private Field all; Field getAll() { if (allBuildStage == STAGE_INITIALIZING) throw new IllegalStateException(formatInitCycleMessage()); if (allBuildStage == STAGE_UNINITIALIZED) { allBuildStage = STAGE_INITIALIZING; this.all = getAllInitialize(); allBuildStage = STAGE_INITIALIZED; } return this.all; } void all(Field all) { this.all = all; allBuildStage = STAGE_INITIALIZED; } private byte beforeTokenFiltersBuildStage = STAGE_UNINITIALIZED; private ImmutableList beforeTokenFilters; ImmutableList getBeforeTokenFilters() { if (beforeTokenFiltersBuildStage == STAGE_INITIALIZING) throw new IllegalStateException(formatInitCycleMessage()); if (beforeTokenFiltersBuildStage == STAGE_UNINITIALIZED) { beforeTokenFiltersBuildStage = STAGE_INITIALIZING; this.beforeTokenFilters = ImmutableList.copyOf(getBeforeTokenFiltersInitialize()); beforeTokenFiltersBuildStage = STAGE_INITIALIZED; } return this.beforeTokenFilters; } void beforeTokenFilters(ImmutableList beforeTokenFilters) { this.beforeTokenFilters = beforeTokenFilters; beforeTokenFiltersBuildStage = STAGE_INITIALIZED; } private byte fieldsBuildStage = STAGE_UNINITIALIZED; private ImmutableList fields; ImmutableList getFields() { if (fieldsBuildStage == STAGE_INITIALIZING) throw new IllegalStateException(formatInitCycleMessage()); if (fieldsBuildStage == STAGE_UNINITIALIZED) { fieldsBuildStage = STAGE_INITIALIZING; this.fields = ImmutableList.copyOf(getFieldsInitialize()); fieldsBuildStage = STAGE_INITIALIZED; } return this.fields; } void fields(ImmutableList fields) { this.fields = fields; fieldsBuildStage = STAGE_INITIALIZED; } private byte propertiesBuildStage = STAGE_UNINITIALIZED; private ImmutableMap properties; ImmutableMap getProperties() { if (propertiesBuildStage == STAGE_INITIALIZING) throw new IllegalStateException(formatInitCycleMessage()); if (propertiesBuildStage == STAGE_UNINITIALIZED) { propertiesBuildStage = STAGE_INITIALIZING; this.properties = ImmutableMap.copyOf(getPropertiesInitialize()); propertiesBuildStage = STAGE_INITIALIZED; } return this.properties; } void properties(ImmutableMap properties) { this.properties = properties; propertiesBuildStage = STAGE_INITIALIZED; } private byte sourceBuildStage = STAGE_UNINITIALIZED; private Field source; Field getSource() { if (sourceBuildStage == STAGE_INITIALIZING) throw new IllegalStateException(formatInitCycleMessage()); if (sourceBuildStage == STAGE_UNINITIALIZED) { sourceBuildStage = STAGE_INITIALIZING; this.source = getSourceInitialize(); sourceBuildStage = STAGE_INITIALIZED; } return this.source; } void source(Field source) { this.source = source; sourceBuildStage = STAGE_INITIALIZED; } private String formatInitCycleMessage() { List attributes = new ArrayList<>(); if (afterTokenFiltersBuildStage == STAGE_INITIALIZING) attributes.add("afterTokenFilters"); if (allBuildStage == STAGE_INITIALIZING) attributes.add("all"); if (beforeTokenFiltersBuildStage == STAGE_INITIALIZING) attributes.add("beforeTokenFilters"); if (fieldsBuildStage == STAGE_INITIALIZING) attributes.add("fields"); if (propertiesBuildStage == STAGE_INITIALIZING) attributes.add("properties"); if (sourceBuildStage == STAGE_INITIALIZING) attributes.add("source"); return "Cannot build Mapping, attribute initializers form cycle " + attributes; } } private List getAfterTokenFiltersInitialize() { return Mapping.super.getAfterTokenFilters(); } private @Nullable Field getAllInitialize() { return Mapping.super.getAll(); } private List getBeforeTokenFiltersInitialize() { return Mapping.super.getBeforeTokenFilters(); } private List getFieldsInitialize() { return Mapping.super.getFields(); } private Map getPropertiesInitialize() { return Mapping.super.getProperties(); } private @Nullable Field getSourceInitialize() { return Mapping.super.getSource(); } /** * @return The value of the {@code afterTokenFilters} attribute */ @JsonView(Views.Enhancement.class) @JsonProperty("after_token_filters") @Override public ImmutableList getAfterTokenFilters() { InitShim shim = this.initShim; return shim != null ? shim.getAfterTokenFilters() : this.afterTokenFilters; } /** * Returns configuration of _all meta field. * @return configuration of _all meta field. */ @JsonProperty("_all") @JsonView(Views.Elastic.Version5.class) @JsonSerialize(using = Mapping.FieldSerializer.class) @JsonDeserialize(using = Mapping.FieldDeserializer.class) @Override public @Nullable Field getAll() { InitShim shim = this.initShim; return shim != null ? shim.getAll() : this.all; } /** * @return The value of the {@code beforeTokenFilters} attribute */ @JsonView(Views.Enhancement.class) @JsonProperty("before_token_filters") @Override public ImmutableList getBeforeTokenFilters() { InitShim shim = this.initShim; return shim != null ? shim.getBeforeTokenFilters() : this.beforeTokenFilters; } /** * @return The value of the {@code dynamic} attribute */ @JsonProperty("dynamic") @JsonView(Views.Elastic.class) @Override public @Nullable Mapping.Dynamic getDynamic() { return dynamic; } /** * Returns a list of fields in the index. * @return list of fields in the index. */ @JsonProperty("fields") @JsonIgnore @Override public ImmutableList getFields() { InitShim shim = this.initShim; return shim != null ? shim.getFields() : this.fields; } /** * @return The value of the {@code properties} attribute */ @JsonProperty("properties") @JsonSerialize(contentUsing = Mapping.FieldSerializer.class) @JsonDeserialize(contentUsing = Mapping.FieldDeserializer.class) @Override public ImmutableMap getProperties() { InitShim shim = this.initShim; return shim != null ? shim.getProperties() : this.properties; } /** * Returns configuration of _source meta field. * @return configuration of _source meta field. */ @JsonProperty("_source") @JsonView(Views.Elastic.class) @JsonSerialize(using = Mapping.FieldSerializer.class) @JsonDeserialize(using = Mapping.FieldDeserializer.class) @Override public @Nullable Field getSource() { InitShim shim = this.initShim; return shim != null ? shim.getSource() : this.source; } /** * This instance is equal to all instances of {@code ImmutableMapping} that have equal attribute values. * @return {@code true} if {@code this} is equal to {@code another} instance */ @Override public boolean equals(@javax.annotation.Nullable Object another) { if (this == another) return true; return another instanceof ImmutableMapping && equalTo((ImmutableMapping) another); } @SuppressWarnings("MethodCanBeStatic") private boolean equalTo(ImmutableMapping another) { return true; } /** * Returns a constant hash code value. * @return hashCode value */ @Override public int hashCode() { return 0; } /** * Prints the immutable value {@code Mapping}. * @return A string representation of the value */ @Override public String toString() { return "Mapping{}"; } @SuppressWarnings("Immutable") private transient volatile long lazyInitBitmap; private static final long ALIASES_LAZY_INIT_BIT = 0x1L; @SuppressWarnings("Immutable") private transient Map aliases; /** * {@inheritDoc} *

* Returns a lazily initialized value of the {@link Mapping#getAliases() aliases} attribute. * Initialized once and only once and stored for subsequent access with proper synchronization. * In case of any exception or error thrown by the lazy value initializer, * the result will not be memoised (i.e. remembered) and on next call computation * will be attempted again. * @return A lazily initialized value of the {@code aliases} attribute */ @Override public Map getAliases() { if ((lazyInitBitmap & ALIASES_LAZY_INIT_BIT) == 0) { synchronized (this) { if ((lazyInitBitmap & ALIASES_LAZY_INIT_BIT) == 0) { this.aliases = Objects.requireNonNull(Mapping.super.getAliases(), "aliases"); lazyInitBitmap |= ALIASES_LAZY_INIT_BIT; } } } return aliases; } private static final long FIELD_TOKEN_FILTERS_LAZY_INIT_BIT = 0x2L; @SuppressWarnings("Immutable") private transient Map fieldTokenFilters; /** * {@inheritDoc} *

* Returns a lazily initialized value of the {@link Mapping#getFieldTokenFilters() fieldTokenFilters} attribute. * Initialized once and only once and stored for subsequent access with proper synchronization. * In case of any exception or error thrown by the lazy value initializer, * the result will not be memoised (i.e. remembered) and on next call computation * will be attempted again. * @return A lazily initialized value of the {@code fieldTokenFilters} attribute */ @Override public Map getFieldTokenFilters() { if ((lazyInitBitmap & FIELD_TOKEN_FILTERS_LAZY_INIT_BIT) == 0) { synchronized (this) { if ((lazyInitBitmap & FIELD_TOKEN_FILTERS_LAZY_INIT_BIT) == 0) { this.fieldTokenFilters = Objects.requireNonNull(Mapping.super.getFieldTokenFilters(), "fieldTokenFilters"); lazyInitBitmap |= FIELD_TOKEN_FILTERS_LAZY_INIT_BIT; } } } return fieldTokenFilters; } private static ImmutableMapping validate(ImmutableMapping instance) { instance = (ImmutableMapping) instance.normalizeFields(); return instance; } private Object readResolve() throws ObjectStreamException { return validate(this); } /** * Creates a builder for {@link ImmutableMapping ImmutableMapping}. *

   * ImmutableMapping.builder()
   *    .addAfterTokenFilter|addAllAfterTokenFilters(com.arakelian.elastic.doc.filters.TokenFilter) // {@link Mapping#getAfterTokenFilters() afterTokenFilters} elements
   *    .all(com.arakelian.elastic.model.Field | null) // nullable {@link Mapping#getAll() all}
   *    .addBeforeTokenFilter|addAllBeforeTokenFilters(com.arakelian.elastic.doc.filters.TokenFilter) // {@link Mapping#getBeforeTokenFilters() beforeTokenFilters} elements
   *    .dynamic(com.arakelian.elastic.model.Mapping.Dynamic | null) // nullable {@link Mapping#getDynamic() dynamic}
   *    .addField|addAllFields(com.arakelian.elastic.model.Field) // {@link Mapping#getFields() fields} elements
   *    .putProperty|putAllProperties(String => com.arakelian.elastic.model.Field) // {@link Mapping#getProperties() properties} mappings
   *    .source(com.arakelian.elastic.model.Field | null) // nullable {@link Mapping#getSource() source}
   *    .build();
   * 
* @return A new ImmutableMapping builder */ public static ImmutableMapping.Builder builder() { return new ImmutableMapping.Builder(); } /** * Builds instances of type {@link ImmutableMapping ImmutableMapping}. * Initialize attributes and then invoke the {@link #build()} method to create an * immutable instance. *

{@code Builder} is not thread-safe and generally should not be stored in a field or collection, * but instead used immediately to create instances. */ @Generated(from = "Mapping", generator = "Immutables") @NotThreadSafe @JsonPropertyOrder({"_all", "_source", "dynamic", "before_token_filters", "after_token_filters", "properties"}) public static final class Builder { private static final long OPT_BIT_AFTER_TOKEN_FILTERS = 0x1L; private static final long OPT_BIT_ALL = 0x2L; private static final long OPT_BIT_BEFORE_TOKEN_FILTERS = 0x4L; private static final long OPT_BIT_FIELDS = 0x8L; private static final long OPT_BIT_PROPERTIES = 0x10L; private static final long OPT_BIT_SOURCE = 0x20L; private long optBits; private ImmutableList.Builder afterTokenFilters = ImmutableList.builder(); private @javax.annotation.Nullable Field all; private ImmutableList.Builder beforeTokenFilters = ImmutableList.builder(); private @javax.annotation.Nullable Mapping.Dynamic dynamic; private ImmutableList.Builder fields = ImmutableList.builder(); private ImmutableMap.Builder properties = ImmutableMap.builder(); private @javax.annotation.Nullable Field source; private Builder() { } /** * Fill a builder with attribute values from the provided {@code Mapping} instance. * Regular attribute values will be replaced with those from the given instance. * Absent optional values will not replace present values. * Collection elements and entries will be added, not replaced. * @param instance The instance from which to copy values * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Builder from(Mapping instance) { Objects.requireNonNull(instance, "instance"); addAllAfterTokenFilters(instance.getAfterTokenFilters()); Field allValue = instance.getAll(); if (allValue != null) { all(allValue); } addAllBeforeTokenFilters(instance.getBeforeTokenFilters()); Mapping.Dynamic dynamicValue = instance.getDynamic(); if (dynamicValue != null) { dynamic(dynamicValue); } addAllFields(instance.getFields()); putAllProperties(instance.getProperties()); Field sourceValue = instance.getSource(); if (sourceValue != null) { source(sourceValue); } return this; } /** * Adds one element to {@link Mapping#getAfterTokenFilters() afterTokenFilters} list. * @param element A afterTokenFilters element * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Builder addAfterTokenFilter(TokenFilter element) { this.afterTokenFilters.add(element); optBits |= OPT_BIT_AFTER_TOKEN_FILTERS; return this; } /** * Adds elements to {@link Mapping#getAfterTokenFilters() afterTokenFilters} list. * @param elements An array of afterTokenFilters elements * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Builder addAfterTokenFilters(TokenFilter... elements) { this.afterTokenFilters.add(elements); optBits |= OPT_BIT_AFTER_TOKEN_FILTERS; return this; } /** * Sets or replaces all elements for {@link Mapping#getAfterTokenFilters() afterTokenFilters} list. * @param elements An iterable of afterTokenFilters elements * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue @JsonView(Views.Enhancement.class) @JsonProperty("after_token_filters") public final Builder afterTokenFilters(Iterable elements) { this.afterTokenFilters = ImmutableList.builder(); return addAllAfterTokenFilters(elements); } /** * Adds elements to {@link Mapping#getAfterTokenFilters() afterTokenFilters} list. * @param elements An iterable of afterTokenFilters elements * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Builder addAllAfterTokenFilters(Iterable elements) { this.afterTokenFilters.addAll(elements); optBits |= OPT_BIT_AFTER_TOKEN_FILTERS; return this; } /** * Initializes the value for the {@link Mapping#getAll() all} attribute. *

If not set, this attribute will have a default value as returned by the initializer of {@link Mapping#getAll() all}. * @param all The value for all (can be {@code null}) * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue @JsonProperty("_all") @JsonView(Views.Elastic.Version5.class) @JsonSerialize(using = Mapping.FieldSerializer.class) @JsonDeserialize(using = Mapping.FieldDeserializer.class) public final Builder all(@Nullable Field all) { this.all = all; optBits |= OPT_BIT_ALL; return this; } /** * Adds one element to {@link Mapping#getBeforeTokenFilters() beforeTokenFilters} list. * @param element A beforeTokenFilters element * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Builder addBeforeTokenFilter(TokenFilter element) { this.beforeTokenFilters.add(element); optBits |= OPT_BIT_BEFORE_TOKEN_FILTERS; return this; } /** * Adds elements to {@link Mapping#getBeforeTokenFilters() beforeTokenFilters} list. * @param elements An array of beforeTokenFilters elements * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Builder addBeforeTokenFilters(TokenFilter... elements) { this.beforeTokenFilters.add(elements); optBits |= OPT_BIT_BEFORE_TOKEN_FILTERS; return this; } /** * Sets or replaces all elements for {@link Mapping#getBeforeTokenFilters() beforeTokenFilters} list. * @param elements An iterable of beforeTokenFilters elements * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue @JsonView(Views.Enhancement.class) @JsonProperty("before_token_filters") public final Builder beforeTokenFilters(Iterable elements) { this.beforeTokenFilters = ImmutableList.builder(); return addAllBeforeTokenFilters(elements); } /** * Adds elements to {@link Mapping#getBeforeTokenFilters() beforeTokenFilters} list. * @param elements An iterable of beforeTokenFilters elements * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Builder addAllBeforeTokenFilters(Iterable elements) { this.beforeTokenFilters.addAll(elements); optBits |= OPT_BIT_BEFORE_TOKEN_FILTERS; return this; } /** * Initializes the value for the {@link Mapping#getDynamic() dynamic} attribute. * @param dynamic The value for dynamic (can be {@code null}) * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue @JsonProperty("dynamic") @JsonView(Views.Elastic.class) public final Builder dynamic(@Nullable Mapping.Dynamic dynamic) { this.dynamic = dynamic; return this; } /** * Adds one element to {@link Mapping#getFields() fields} list. * @param element A fields element * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Builder addField(Field element) { this.fields.add(element); optBits |= OPT_BIT_FIELDS; return this; } /** * Adds elements to {@link Mapping#getFields() fields} list. * @param elements An array of fields elements * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Builder addFields(Field... elements) { this.fields.add(elements); optBits |= OPT_BIT_FIELDS; return this; } /** * Sets or replaces all elements for {@link Mapping#getFields() fields} list. * @param elements An iterable of fields elements * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue @JsonProperty("fields") @JsonIgnore public final Builder fields(Iterable elements) { this.fields = ImmutableList.builder(); return addAllFields(elements); } /** * Adds elements to {@link Mapping#getFields() fields} list. * @param elements An iterable of fields elements * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Builder addAllFields(Iterable elements) { this.fields.addAll(elements); optBits |= OPT_BIT_FIELDS; return this; } /** * Put one entry to the {@link Mapping#getProperties() properties} map. * @param key The key in the properties map * @param value The associated value in the properties map * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Builder putProperty(String key, Field value) { this.properties.put(key, value); optBits |= OPT_BIT_PROPERTIES; return this; } /** * Put one entry to the {@link Mapping#getProperties() properties} map. Nulls are not permitted * @param entry The key and value entry * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Builder putProperty(Map.Entry entry) { this.properties.put(entry); optBits |= OPT_BIT_PROPERTIES; return this; } /** * Sets or replaces all mappings from the specified map as entries for the {@link Mapping#getProperties() properties} map. Nulls are not permitted * @param entries The entries that will be added to the properties map * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue @JsonProperty("properties") @JsonSerialize(contentUsing = Mapping.FieldSerializer.class) @JsonDeserialize(contentUsing = Mapping.FieldDeserializer.class) public final Builder properties(Map entries) { this.properties = ImmutableMap.builder(); optBits |= OPT_BIT_PROPERTIES; return putAllProperties(entries); } /** * Put all mappings from the specified map as entries to {@link Mapping#getProperties() properties} map. Nulls are not permitted * @param entries The entries that will be added to the properties map * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Builder putAllProperties(Map entries) { this.properties.putAll(entries); optBits |= OPT_BIT_PROPERTIES; return this; } /** * Initializes the value for the {@link Mapping#getSource() source} attribute. *

If not set, this attribute will have a default value as returned by the initializer of {@link Mapping#getSource() source}. * @param source The value for source (can be {@code null}) * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue @JsonProperty("_source") @JsonView(Views.Elastic.class) @JsonSerialize(using = Mapping.FieldSerializer.class) @JsonDeserialize(using = Mapping.FieldDeserializer.class) public final Builder source(@Nullable Field source) { this.source = source; optBits |= OPT_BIT_SOURCE; return this; } /** * Builds a new {@link ImmutableMapping ImmutableMapping}. * @return An immutable instance of Mapping * @throws java.lang.IllegalStateException if any required attributes are missing */ public ImmutableMapping build() { return ImmutableMapping.validate(new ImmutableMapping(this)); } private boolean afterTokenFiltersIsSet() { return (optBits & OPT_BIT_AFTER_TOKEN_FILTERS) != 0; } private boolean allIsSet() { return (optBits & OPT_BIT_ALL) != 0; } private boolean beforeTokenFiltersIsSet() { return (optBits & OPT_BIT_BEFORE_TOKEN_FILTERS) != 0; } private boolean fieldsIsSet() { return (optBits & OPT_BIT_FIELDS) != 0; } private boolean propertiesIsSet() { return (optBits & OPT_BIT_PROPERTIES) != 0; } private boolean sourceIsSet() { return (optBits & OPT_BIT_SOURCE) != 0; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy