@Generated(value="org.immutables.processor.ProxyProcessor") public final class ImmutableVariable extends Variable
Variable.
Use the builder to create immutable instances:
ImmutableVariable.builder().
Use the static factory method to create immutable instances:
ImmutableVariable.of().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableVariable.Builder
Builds instances of type
ImmutableVariable. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableVariable.Builder |
builder()
Creates a builder for
ImmutableVariable. |
static ImmutableVariable |
copyOf(Variable instance)
Creates an immutable copy of a
Variable value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableVariable that have equal attribute values. |
int |
hash() |
int |
hashCode()
Computes a hash code from attributes:
hash, name, position. |
String |
name() |
static ImmutableVariable |
of(int hash,
String name,
int position)
Construct a new immutable
Variable instance. |
int |
position() |
String |
toString()
Prints the immutable value
Variable with attribute values. |
ImmutableVariable |
withHash(int value)
Copy the current immutable object by setting a value for the
hash attribute. |
ImmutableVariable |
withName(String value)
Copy the current immutable object by setting a value for the
name attribute. |
ImmutableVariable |
withPosition(int value)
Copy the current immutable object by setting a value for the
position attribute. |
public int hash()
public String name()
public int position()
public final ImmutableVariable withHash(int value)
hash attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for hashthis objectpublic final ImmutableVariable withName(String value)
name attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for namethis objectpublic final ImmutableVariable withPosition(int value)
position attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for positionthis objectpublic boolean equals(Object another)
ImmutableVariable that have equal attribute values.public int hashCode()
hash, name, position.public String toString()
Variable with attribute values.public static ImmutableVariable of(int hash, String name, int position)
Variable instance.hash - The value for the hash attributename - The value for the name attributeposition - The value for the position attributepublic static ImmutableVariable copyOf(Variable instance)
Variable 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 ImmutableVariable.Builder builder()
ImmutableVariable.
ImmutableVariable.builder()
.hash(int) // required hash
.name(String) // required name
.position(int) // required position
.build();
Copyright © 2024. All rights reserved.