@Generated(value="org.immutables.processor.ProxyProcessor") public final class ImmutableToken extends Object implements Token
Token.
Use the builder to create immutable instances:
ImmutableToken.builder().
Use the static factory method to create immutable instances:
ImmutableToken.of().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableToken.Builder
Builds instances of type
ImmutableToken. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableToken.Builder |
builder()
Creates a builder for
ImmutableToken. |
static ImmutableToken |
copyOf(Token instance)
Creates an immutable copy of a
Token value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableToken that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
start, value, type. |
static ImmutableToken |
of(int start,
String value,
TokenType type)
Construct a new immutable
Token instance. |
int |
start() |
String |
toString()
Prints the immutable value
Token with attribute values. |
TokenType |
type() |
String |
value() |
ImmutableToken |
withStart(int value)
Copy the current immutable object by setting a value for the
start attribute. |
ImmutableToken |
withType(TokenType value)
Copy the current immutable object by setting a value for the
type attribute. |
ImmutableToken |
withValue(String value)
Copy the current immutable object by setting a value for the
value attribute. |
public int start()
public String value()
public TokenType type()
public final ImmutableToken withStart(int value)
start attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for startthis objectpublic final ImmutableToken withValue(String value)
value attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for valuethis objectpublic final ImmutableToken withType(TokenType value)
type attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for typethis objectpublic boolean equals(Object another)
ImmutableToken that have equal attribute values.public int hashCode()
start, value, type.public String toString()
Token with attribute values.public static ImmutableToken of(int start, String value, TokenType type)
Token instance.public static ImmutableToken copyOf(Token instance)
Token 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 ImmutableToken.Builder builder()
ImmutableToken.
ImmutableToken.builder()
.start(int) // required start
.value(String) // required value
.type(de.flapdoodle.eval.core.parser.TokenType) // required type
.build();
Copyright © 2024. All rights reserved.