Class ImmutableTrees.TypeIdentifier
- java.lang.Object
-
- org.immutables.generator.processor.Trees.TypeIdentifier
-
- org.immutables.generator.processor.ImmutableTrees.TypeIdentifier
-
- Enclosing class:
- ImmutableTrees
@Immutable public static final class ImmutableTrees.TypeIdentifier extends Trees.TypeIdentifier
Immutable implementation ofTrees.TypeIdentifier.Use the static factory method to create immutable instances:
ImmutableTrees.TypeIdentifier.of().
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Stringvalue
-
Constructor Summary
Constructors Modifier Constructor Description privateTypeIdentifier(java.lang.String value)privateTypeIdentifier(ImmutableTrees.TypeIdentifier original, java.lang.String value)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableTrees.TypeIdentifiercopyOf(Trees.TypeIdentifier instance)Creates an immutable copy of aTrees.TypeIdentifiervalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofTypeIdentifierthat have equal attribute values.private booleanequalTo(int synthetic, ImmutableTrees.TypeIdentifier another)inthashCode()Computes a hash code from attributes:value.static ImmutableTrees.TypeIdentifierof(java.lang.String value)Construct a new immutableTypeIdentifierinstance.java.lang.Stringvalue()ImmutableTrees.TypeIdentifierwithValue(java.lang.String value)Copy the current immutable object by setting a value for thevalueattribute.-
Methods inherited from class org.immutables.generator.processor.Trees.TypeIdentifier
toString
-
-
-
-
Constructor Detail
-
TypeIdentifier
private TypeIdentifier(java.lang.String value)
-
TypeIdentifier
private TypeIdentifier(ImmutableTrees.TypeIdentifier original, java.lang.String value)
-
-
Method Detail
-
value
public java.lang.String value()
- Specified by:
valuein classTrees.TypeIdentifier- Returns:
- The value of the
valueattribute
-
withValue
public final ImmutableTrees.TypeIdentifier withValue(java.lang.String value)
Copy the current immutable object by setting a value for thevalueattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for value- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable java.lang.Object another)This instance is equal to all instances ofTypeIdentifierthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
equalTo
private boolean equalTo(int synthetic, ImmutableTrees.TypeIdentifier another)
-
hashCode
public int hashCode()
Computes a hash code from attributes:value.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
of
public static ImmutableTrees.TypeIdentifier of(java.lang.String value)
Construct a new immutableTypeIdentifierinstance.- Parameters:
value- The value for thevalueattribute- Returns:
- An immutable TypeIdentifier instance
-
copyOf
public static ImmutableTrees.TypeIdentifier copyOf(Trees.TypeIdentifier instance)
Creates an immutable copy of aTrees.TypeIdentifiervalue. 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 TypeIdentifier instance
-
-