Class ImmutableOkTypeAdapterTypes

java.lang.Object
org.immutables.value.processor.OkJsons.OkTypeAdapterTypes
org.immutables.value.processor.ImmutableOkTypeAdapterTypes

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable final class ImmutableOkTypeAdapterTypes extends OkJsons.OkTypeAdapterTypes
Immutable implementation of OkJsons.OkTypeAdapterTypes.

Use the builder to create immutable instances: ImmutableOkTypeAdapterTypes.builder().

  • Field Details

  • Constructor Details

  • Method Details

    • definedBy

      Specified by:
      definedBy in class OkJsons.OkTypeAdapterTypes
      Returns:
      The value of the definedBy attribute
    • packageGenerated

      String packageGenerated()
      Specified by:
      packageGenerated in class OkJsons.OkTypeAdapterTypes
      Returns:
      The value of the packageGenerated attribute
    • types

      com.google.common.collect.ImmutableList<ValueType> types()
      Specified by:
      types in class OkJsons.OkTypeAdapterTypes
      Returns:
      The value of the types attribute
    • enums

      Overrides:
      enums in class OkJsons.OkTypeAdapterTypes
      Returns:
      The computed-at-construction value of the enums attribute
    • withDefinedBy

      public final ImmutableOkTypeAdapterTypes withDefinedBy(Proto.AbstractDeclaring value)
      Copy the current immutable object by setting a value for the definedBy attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for definedBy
      Returns:
      A modified copy of the this object
    • withPackageGenerated

      public final ImmutableOkTypeAdapterTypes withPackageGenerated(String value)
      Copy the current immutable object by setting a value for the packageGenerated attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for packageGenerated
      Returns:
      A modified copy of the this object
    • withTypes

      public final ImmutableOkTypeAdapterTypes withTypes(ValueType... elements)
      Copy the current immutable object with elements that replace the content of types.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withTypes

      public final ImmutableOkTypeAdapterTypes withTypes(Iterable<? extends ValueType> elements)
      Copy the current immutable object with elements that replace the content of types. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of types 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 ImmutableOkTypeAdapterTypes that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • equalTo

      private boolean equalTo(int synthetic, ImmutableOkTypeAdapterTypes another)
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: definedBy, packageGenerated, types, enums.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      Creates an immutable copy of a OkJsons.OkTypeAdapterTypes 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 OkTypeAdapterTypes instance
    • builder

      public static ImmutableOkTypeAdapterTypes.Builder builder()
      Creates a builder for ImmutableOkTypeAdapterTypes.
       ImmutableOkTypeAdapterTypes.builder()
          .definedBy(org.immutables.value.processor.meta.Proto.AbstractDeclaring) // required definedBy
          .packageGenerated(String) // required packageGenerated
          .addTypes|addAllTypes(org.immutables.value.processor.meta.ValueType) // types elements
          .build();
       
      Returns:
      A new ImmutableOkTypeAdapterTypes builder