Class ImmutableValueMapQualifier


@Generated(from="ValueMapQualifier", generator="Immutables") @ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableValueMapQualifier extends ValueMapQualifier
Immutable implementation of ValueMapQualifier.

Use the builder to create immutable instances: ImmutableValueMapQualifier.builder(). Use the static factory method to create immutable instances: ImmutableValueMapQualifier.of().

  • Method Details

    • values

      public com.google.common.collect.ImmutableList<String> values()
      The enumeration of valid options.
      Specified by:
      values in class ValueMapQualifier
    • type

      public QualifierType type()
      Description copied from class: Qualifier
      The qualifier type.
      Overrides:
      type in class ValueMapQualifier
      Returns:
      The computed-at-construction value of the type attribute
    • withValues

      public final ImmutableValueMapQualifier withValues(String... elements)
      Copy the current immutable object with elements that replace the content of values.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withValues

      public final ImmutableValueMapQualifier withValues(Iterable<String> elements)
      Copy the current immutable object with elements that replace the content of values. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of values elements to set
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableValueMapQualifier that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: values, type.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value ValueMapQualifier with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • of

      public static ImmutableValueMapQualifier of(List<String> values)
      Construct a new immutable ValueMapQualifier instance.
      Parameters:
      values - The value for the values attribute
      Returns:
      An immutable ValueMapQualifier instance
    • of

      public static ImmutableValueMapQualifier of(Iterable<String> values)
      Construct a new immutable ValueMapQualifier instance.
      Parameters:
      values - The value for the values attribute
      Returns:
      An immutable ValueMapQualifier instance
    • copyOf

      public static ImmutableValueMapQualifier copyOf(ValueMapQualifier instance)
      Creates an immutable copy of a ValueMapQualifier value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable ValueMapQualifier instance
    • builder

      public static ImmutableValueMapQualifier.Builder builder()
      Creates a builder for ImmutableValueMapQualifier.
       ImmutableValueMapQualifier.builder()
          .addValues|addAllValues(String) // values elements
          .build();
       
      Returns:
      A new ImmutableValueMapQualifier builder