Class ImmutableEncodedElement.TypeParam
java.lang.Object
org.immutables.value.processor.encode.EncodedElement.TypeParam
org.immutables.value.processor.encode.ImmutableEncodedElement.TypeParam
- Enclosing class:
ImmutableEncodedElement
Immutable implementation of
EncodedElement.TypeParam.
Use the builder to create immutable instances:
new EncodedElement.TypeParam.Builder().
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.google.common.collect.ImmutableList<Type.Defined> private final String -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateTypeParam(String name, com.google.common.collect.ImmutableList<Type.Defined> bounds) -
Method Summary
Modifier and TypeMethodDescription(package private) com.google.common.collect.ImmutableList<Type.Defined> bounds()static EncodedElement.TypeParamcopyOf(EncodedElement.TypeParam instance) Creates an immutable copy of aEncodedElement.TypeParamvalue.booleanThis instance is equal to all instances ofTypeParamthat have equal attribute values.private booleanequalTo(int synthetic, ImmutableEncodedElement.TypeParam another) inthashCode()Computes a hash code from attributes:name,bounds.(package private) Stringname()withBounds(Iterable<? extends Type.Defined> elements) Copy the current immutable object with elements that replace the content ofbounds.withBounds(Type.Defined... elements) Copy the current immutable object with elements that replace the content ofbounds.Copy the current immutable object by setting a value for thenameattribute.Methods inherited from class org.immutables.value.processor.encode.EncodedElement.TypeParam
from, toString
-
Field Details
-
name
-
bounds
-
-
Constructor Details
-
TypeParam
-
-
Method Details
-
name
String name()- Specified by:
namein classEncodedElement.TypeParam- Returns:
- The value of the
nameattribute
-
bounds
com.google.common.collect.ImmutableList<Type.Defined> bounds()- Specified by:
boundsin classEncodedElement.TypeParam- Returns:
- The value of the
boundsattribute
-
withName
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name- Returns:
- A modified copy of the
thisobject
-
withBounds
Copy the current immutable object with elements that replace the content ofbounds.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withBounds
public final ImmutableEncodedElement.TypeParam withBounds(Iterable<? extends Type.Defined> elements) Copy the current immutable object with elements that replace the content ofbounds. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of bounds elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofTypeParamthat have equal attribute values. -
equalTo
-
hashCode
public int hashCode()Computes a hash code from attributes:name,bounds. -
copyOf
Creates an immutable copy of aEncodedElement.TypeParamvalue. 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
-