Class ImmutableEncodedElement.TypeParam

    • Field Detail

      • name

        private final java.lang.String name
      • bounds

        private final com.google.common.collect.ImmutableList<Type.Defined> bounds
    • Constructor Detail

      • TypeParam

        private TypeParam​(java.lang.String name,
                          com.google.common.collect.ImmutableList<Type.Defined> bounds)
    • Method Detail

      • withName

        public final ImmutableEncodedElement.TypeParam withName​(java.lang.String value)
        Copy the current immutable object by setting a value for the name attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for name
        Returns:
        A modified copy of the this object
      • withBounds

        public final ImmutableEncodedElement.TypeParam withBounds​(Type.Defined... elements)
        Copy the current immutable object with elements that replace the content of bounds.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withBounds

        public final ImmutableEncodedElement.TypeParam withBounds​(java.lang.Iterable<? extends Type.Defined> elements)
        Copy the current immutable object with elements that replace the content of bounds. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of bounds 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 TypeParam 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: name, bounds.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashCode value
      • copyOf

        public static EncodedElement.TypeParam copyOf​(EncodedElement.TypeParam instance)
        Creates an immutable copy of a EncodedElement.TypeParam 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 TypeParam instance