@Generated(value="org.immutables.processor.ProxyProcessor") public final class ImmutableStateID<T> extends Object implements StateID<T>
StateID.
Use the builder to create immutable instances:
ImmutableStateID.builder().
Use the static factory method to create immutable instances:
ImmutableStateID.of().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableStateID.Builder<T>
Builds instances of type
ImmutableStateID. |
| Modifier and Type | Method and Description |
|---|---|
static <T> ImmutableStateID.Builder<T> |
builder()
Creates a builder for
ImmutableStateID. |
static <T> ImmutableStateID<T> |
copyOf(StateID<T> instance)
Creates an immutable copy of a
StateID value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableStateID that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
name, type. |
String |
name() |
static <T> ImmutableStateID<T> |
of(String name,
de.flapdoodle.reflection.TypeInfo<T> type)
Construct a new immutable
StateID instance. |
String |
toString()
Prints the immutable value
StateID with attribute values. |
de.flapdoodle.reflection.TypeInfo<T> |
type() |
ImmutableStateID<T> |
withName(String value)
Copy the current immutable object by setting a value for the
name attribute. |
ImmutableStateID<T> |
withType(de.flapdoodle.reflection.TypeInfo<T> value)
Copy the current immutable object by setting a value for the
type attribute. |
public String name()
public de.flapdoodle.reflection.TypeInfo<T> type()
public final ImmutableStateID<T> 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 ImmutableStateID<T> withType(de.flapdoodle.reflection.TypeInfo<T> value)
type attribute.
A shallow reference 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)
ImmutableStateID that have equal attribute values.public int hashCode()
name, type.public String toString()
StateID with attribute values.public static <T> ImmutableStateID<T> of(String name, de.flapdoodle.reflection.TypeInfo<T> type)
StateID instance.public static <T> ImmutableStateID<T> copyOf(StateID<T> instance)
StateID 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> ImmutableStateID.Builder<T> builder()
ImmutableStateID.
ImmutableStateID.<T>builder()
.name(String) // required name
.type(de.flapdoodle.reflection.TypeInfo<T>) // required type
.build();
T - generic parameter TCopyright © 2023. All rights reserved.