@Generated(value="org.immutables.processor.ProxyProcessor") public final class ImmutableValueNode<T> extends ValueNode<T>
ValueNode.
Use the builder to create immutable instances:
ImmutableValueNode.builder().
Use the static factory method to create immutable instances:
ImmutableValueNode.of().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableValueNode.Builder<T>
Builds instances of type
ImmutableValueNode. |
| Modifier and Type | Method and Description |
|---|---|
static <T> ImmutableValueNode.Builder<T> |
builder()
Creates a builder for
ImmutableValueNode. |
static <T> ImmutableValueNode<T> |
copyOf(ValueNode<T> instance)
Creates an immutable copy of a
ValueNode value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableValueNode that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
token, value. |
static <T> ImmutableValueNode<T> |
of(Token token,
T value)
Construct a new immutable
ValueNode instance. |
Token |
token() |
String |
toString()
Prints the immutable value
ValueNode with attribute values. |
protected T |
value() |
ImmutableValueNode<T> |
withToken(Token value)
Copy the current immutable object by setting a value for the
token attribute. |
ImmutableValueNode<T> |
withValue(T value)
Copy the current immutable object by setting a value for the
value attribute. |
allNodes, hashedUsedVariables, usedVariables, usedVariablespublic Token token()
protected T value()
public final ImmutableValueNode<T> 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 final ImmutableValueNode<T> withValue(T value)
value attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for valuethis objectpublic boolean equals(Object another)
ImmutableValueNode that have equal attribute values.public int hashCode()
token, value.public String toString()
ValueNode with attribute values.public static <T> ImmutableValueNode<T> of(Token token, T value)
ValueNode instance.T - generic parameter Ttoken - The value for the token attributevalue - The value for the value attributepublic static <T> ImmutableValueNode<T> copyOf(ValueNode<T> instance)
ValueNode value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.T - generic parameter Tinstance - The instance to copypublic static <T> ImmutableValueNode.Builder<T> builder()
ImmutableValueNode.
ImmutableValueNode.<T>builder()
.token(de.flapdoodle.eval.core.parser.Token) // required token
.value(T) // required value
.build();
T - generic parameter TCopyright © 2024. All rights reserved.