Class 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().

    • Constructor Detail

      • ImmutableOkTypeAdapterTypes

        private ImmutableOkTypeAdapterTypes​(Proto.AbstractDeclaring definedBy,
                                            java.lang.String packageGenerated,
                                            com.google.common.collect.ImmutableList<ValueType> types)
    • Method Detail

      • 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​(java.lang.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​(java.lang.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
                              java.lang.Object another)
        This instance is equal to all instances of ImmutableOkTypeAdapterTypes that have equal attribute values.
        Overrides:
        equals in class java.lang.Object
        Returns:
        true if this is equal to another instance
      • hashCode

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

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

        public static ImmutableOkTypeAdapterTypes copyOf​(OkJsons.OkTypeAdapterTypes instance)
        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