@Generated(value="org.immutables.processor.ProxyProcessor") public final class ImmutableASTNode extends ASTNode
ASTNode.
Use the builder to create immutable instances:
ImmutableASTNode.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableASTNode.Builder
Builds instances of type
ImmutableASTNode. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableASTNode.Builder |
builder()
Creates a builder for
ImmutableASTNode. |
static ImmutableASTNode |
copyOf(ASTNode instance)
Creates an immutable copy of a
ASTNode value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableASTNode that have equal attribute values. |
List<ASTNode> |
getParameters() |
Token |
getToken() |
int |
hashCode()
Computes a hash code from attributes:
parameters, token. |
String |
toString()
Prints the immutable value
ASTNode with attribute values. |
ImmutableASTNode |
withParameters(ASTNode... elements)
Copy the current immutable object with elements that replace the content of
parameters. |
ImmutableASTNode |
withParameters(Iterable<? extends ASTNode> elements)
Copy the current immutable object with elements that replace the content of
parameters. |
ImmutableASTNode |
withToken(Token value)
Copy the current immutable object by setting a value for the
token attribute. |
public List<ASTNode> getParameters()
getParameters in class ASTNodeparameters attributepublic Token getToken()
public final ImmutableASTNode withParameters(ASTNode... elements)
parameters.elements - The elements to setthis objectpublic final ImmutableASTNode withParameters(Iterable<? extends ASTNode> elements)
parameters.
A shallow reference equality check is used to prevent copying of the same value by returning this.elements - An iterable of parameters elements to setthis objectpublic final ImmutableASTNode withToken(Token value)
token attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for tokenthis objectpublic boolean equals(Object another)
ImmutableASTNode that have equal attribute values.public int hashCode()
parameters, token.public String toString()
ASTNode with attribute values.public static ImmutableASTNode copyOf(ASTNode instance)
ASTNode value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copypublic static ImmutableASTNode.Builder builder()
ImmutableASTNode.
ImmutableASTNode.builder()
.addParameters|addAllParameters(de.flapdoodle.eval.core.parser.ASTNode) // parameters elements
.token(de.flapdoodle.eval.core.parser.Token) // required token
.build();
Copyright © 2024. All rights reserved.