@Generated(value="org.immutables.processor.ProxyProcessor") public final class ImmutableStateMapping<T> extends StateMapping<T>
StateMapping.
Use the builder to create immutable instances:
ImmutableStateMapping.builder().
Use the static factory method to create immutable instances:
ImmutableStateMapping.of().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableStateMapping.Builder<T>
Builds instances of type
ImmutableStateMapping. |
| Modifier and Type | Method and Description |
|---|---|
static <T> ImmutableStateMapping.Builder<T> |
builder()
Creates a builder for
ImmutableStateMapping. |
static <T> ImmutableStateMapping<T> |
copyOf(StateMapping<T> instance)
Creates an immutable copy of a
StateMapping value. |
StateID<T> |
destination() |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableStateMapping that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
source, destination. |
static <T> ImmutableStateMapping<T> |
of(StateID<T> source,
StateID<T> destination)
Construct a new immutable
StateMapping instance. |
StateID<T> |
source() |
String |
toString()
Prints the immutable value
StateMapping with attribute values. |
ImmutableStateMapping<T> |
withDestination(StateID<T> value)
Copy the current immutable object by setting a value for the
destination attribute. |
ImmutableStateMapping<T> |
withSource(StateID<T> value)
Copy the current immutable object by setting a value for the
source attribute. |
isDirectpublic StateID<T> source()
source in class StateMapping<T>source attributepublic StateID<T> destination()
destination in class StateMapping<T>destination attributepublic final ImmutableStateMapping<T> withSource(StateID<T> value)
source attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for sourcethis objectpublic final ImmutableStateMapping<T> withDestination(StateID<T> value)
destination attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for destinationthis objectpublic boolean equals(Object another)
ImmutableStateMapping that have equal attribute values.public int hashCode()
source, destination.public String toString()
StateMapping with attribute values.public static <T> ImmutableStateMapping<T> of(StateID<T> source, StateID<T> destination)
StateMapping instance.T - generic parameter Tsource - The value for the source attributedestination - The value for the destination attributepublic static <T> ImmutableStateMapping<T> copyOf(StateMapping<T> instance)
StateMapping 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> ImmutableStateMapping.Builder<T> builder()
ImmutableStateMapping.
ImmutableStateMapping.<T>builder()
.source(de.flapdoodle.reverse.StateID<T>) // required source
.destination(de.flapdoodle.reverse.StateID<T>) // required destination
.build();
T - generic parameter TCopyright © 2023. All rights reserved.