Class ImmutableTrees.ForIterationAccessExpression
- java.lang.Object
-
- org.immutables.generator.processor.ImmutableTrees.ForIterationAccessExpression
-
- All Implemented Interfaces:
Trees.AccessExpression,Trees.Expression,Trees.ForIterationAccessExpression
- Enclosing class:
- ImmutableTrees
@Immutable public static final class ImmutableTrees.ForIterationAccessExpression extends java.lang.Object implements Trees.ForIterationAccessExpression
Immutable implementation ofTrees.ForIterationAccessExpression.Use the static factory method to create immutable instances:
ImmutableTrees.ForIterationAccessExpression.of().
-
-
Field Summary
Fields Modifier and Type Field Description private Trees.AccessExpressionaccessprivate com.google.common.collect.ImmutableList<Trees.Identifier>path
-
Constructor Summary
Constructors Modifier Constructor Description privateForIterationAccessExpression(com.google.common.collect.ImmutableList<Trees.Identifier> path, Trees.AccessExpression access)privateForIterationAccessExpression(Trees.AccessExpression access)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Trees.AccessExpressionaccess()static ImmutableTrees.ForIterationAccessExpressioncopyOf(Trees.ForIterationAccessExpression instance)Creates an immutable copy of aTrees.ForIterationAccessExpressionvalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofForIterationAccessExpressionthat have equal attribute values.private booleanequalTo(int synthetic, ImmutableTrees.ForIterationAccessExpression another)inthashCode()Computes a hash code from attributes:path,access.static ImmutableTrees.ForIterationAccessExpressionof(Trees.AccessExpression access)Construct a new immutableForIterationAccessExpressioninstance.com.google.common.collect.ImmutableList<Trees.Identifier>path()java.lang.StringtoString()Prints the immutable valueForIterationAccessExpressionwith attribute values.ImmutableTrees.ForIterationAccessExpressionwithAccess(Trees.AccessExpression value)Copy the current immutable object by setting a value for theaccessattribute.ImmutableTrees.ForIterationAccessExpressionwithPath(java.lang.Iterable<? extends Trees.Identifier> elements)Copy the current immutable object with elements that replace the content ofpath.ImmutableTrees.ForIterationAccessExpressionwithPath(Trees.Identifier... elements)Copy the current immutable object with elements that replace the content ofpath.
-
-
-
Field Detail
-
path
private final com.google.common.collect.ImmutableList<Trees.Identifier> path
-
access
private final Trees.AccessExpression access
-
-
Constructor Detail
-
ForIterationAccessExpression
private ForIterationAccessExpression(Trees.AccessExpression access)
-
ForIterationAccessExpression
private ForIterationAccessExpression(com.google.common.collect.ImmutableList<Trees.Identifier> path, Trees.AccessExpression access)
-
-
Method Detail
-
path
public com.google.common.collect.ImmutableList<Trees.Identifier> path()
- Specified by:
pathin interfaceTrees.AccessExpression- Returns:
- The value of the
pathattribute
-
access
public Trees.AccessExpression access()
- Specified by:
accessin interfaceTrees.ForIterationAccessExpression- Returns:
- The value of the
accessattribute
-
withPath
public final ImmutableTrees.ForIterationAccessExpression withPath(Trees.Identifier... elements)
Copy the current immutable object with elements that replace the content ofpath.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withPath
public final ImmutableTrees.ForIterationAccessExpression withPath(java.lang.Iterable<? extends Trees.Identifier> elements)
Copy the current immutable object with elements that replace the content ofpath. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of path elements to set- Returns:
- A modified copy of
thisobject
-
withAccess
public final ImmutableTrees.ForIterationAccessExpression withAccess(Trees.AccessExpression value)
Copy the current immutable object by setting a value for theaccessattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for access- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable java.lang.Object another)This instance is equal to all instances ofForIterationAccessExpressionthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
equalTo
private boolean equalTo(int synthetic, ImmutableTrees.ForIterationAccessExpression another)
-
hashCode
public int hashCode()
Computes a hash code from attributes:path,access.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueForIterationAccessExpressionwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
of
public static ImmutableTrees.ForIterationAccessExpression of(Trees.AccessExpression access)
Construct a new immutableForIterationAccessExpressioninstance.- Parameters:
access- The value for theaccessattribute- Returns:
- An immutable ForIterationAccessExpression instance
-
copyOf
public static ImmutableTrees.ForIterationAccessExpression copyOf(Trees.ForIterationAccessExpression instance)
Creates an immutable copy of aTrees.ForIterationAccessExpressionvalue. 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 ForIterationAccessExpression instance
-
-