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 Object
implements Trees.ForIterationAccessExpression
Immutable implementation of
Trees.ForIterationAccessExpression.
Use the static factory method to create immutable instances:
ImmutableTrees.ForIterationAccessExpression.of().
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Trees.AccessExpressionprivate final com.google.common.collect.ImmutableList<Trees.Identifier> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateForIterationAccessExpression(com.google.common.collect.ImmutableList<Trees.Identifier> path, Trees.AccessExpression access) private -
Method Summary
Modifier and TypeMethodDescriptionaccess()copyOf(Trees.ForIterationAccessExpression instance) Creates an immutable copy of aTrees.ForIterationAccessExpressionvalue.booleanThis 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.of(Trees.AccessExpression access) Construct a new immutableForIterationAccessExpressioninstance.com.google.common.collect.ImmutableList<Trees.Identifier> path()toString()Prints the immutable valueForIterationAccessExpressionwith attribute values.withAccess(Trees.AccessExpression value) Copy the current immutable object by setting a value for theaccessattribute.withPath(Iterable<? extends Trees.Identifier> elements) Copy the current immutable object with elements that replace the content ofpath.withPath(Trees.Identifier... elements) Copy the current immutable object with elements that replace the content ofpath.
-
Field Details
-
path
-
access
-
-
Constructor Details
-
ForIterationAccessExpression
-
ForIterationAccessExpression
private ForIterationAccessExpression(com.google.common.collect.ImmutableList<Trees.Identifier> path, Trees.AccessExpression access)
-
-
Method Details
-
path
- Specified by:
pathin interfaceTrees.AccessExpression- Returns:
- The value of the
pathattribute
-
access
- Specified by:
accessin interfaceTrees.ForIterationAccessExpression- Returns:
- The value of the
accessattribute
-
withPath
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(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
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
This instance is equal to all instances ofForIterationAccessExpressionthat have equal attribute values. -
equalTo
-
hashCode
public int hashCode()Computes a hash code from attributes:path,access. -
toString
Prints the immutable valueForIterationAccessExpressionwith attribute values. -
of
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
-