@Generated(value="org.immutables.processor.ProxyProcessor") public final class ImmutableDerive<S,D> extends Derive<S,D>
Derive.
Use the builder to create immutable instances:
ImmutableDerive.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableDerive.Builder<S,D>
Builds instances of type
ImmutableDerive. |
Derive.WithSource<S>, Derive.WithSourceAndDestination<S,D>| Modifier and Type | Method and Description |
|---|---|
protected Function<S,State<D>> |
action() |
static <S,D> ImmutableDerive.Builder<S,D> |
builder()
Creates a builder for
ImmutableDerive. |
static <S,D> ImmutableDerive<S,D> |
copyOf(Derive<S,D> instance)
Creates an immutable copy of a
Derive value. |
StateID<D> |
destination() |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableDerive that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
source, destination, action, transitionLabel. |
StateID<S> |
source() |
Set<StateID<?>> |
sources()
Returns a lazily initialized value of the
sources attribute. |
String |
toString()
Prints the immutable value
Derive with attribute values. |
String |
transitionLabel() |
ImmutableDerive<S,D> |
withAction(Function<S,State<D>> value)
Copy the current immutable object by setting a value for the
action attribute. |
ImmutableDerive<S,D> |
withDestination(StateID<D> value)
Copy the current immutable object by setting a value for the
destination attribute. |
ImmutableDerive<S,D> |
withSource(StateID<S> value)
Copy the current immutable object by setting a value for the
source attribute. |
ImmutableDerive<S,D> |
withTransitionLabel(String value)
Copy the current immutable object by setting a value for the
transitionLabel attribute. |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitasLabelpublic StateID<D> destination()
destination in interface Transition<D>destination in class Derive<S,D>destination attributepublic String transitionLabel()
transitionLabel in interface HasLabeltransitionLabel in class Derive<S,D>transitionLabel attributepublic final ImmutableDerive<S,D> withSource(StateID<S> 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 ImmutableDerive<S,D> withDestination(StateID<D> 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 final ImmutableDerive<S,D> withAction(Function<S,State<D>> value)
action attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for actionthis objectpublic final ImmutableDerive<S,D> withTransitionLabel(String value)
transitionLabel attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for transitionLabelthis objectpublic boolean equals(Object another)
ImmutableDerive that have equal attribute values.public int hashCode()
source, destination, action, transitionLabel.public String toString()
Derive with attribute values.public Set<StateID<?>> sources()
Returns a lazily initialized value of the sources attribute.
Initialized once and only once and stored for subsequent access with proper synchronization.
In case of any exception or error thrown by the lazy value initializer,
the result will not be memoised (i.e. remembered) and on next call computation
will be attempted again.
public static <S,D> ImmutableDerive<S,D> copyOf(Derive<S,D> instance)
Derive value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.S - generic parameter SD - generic parameter Dinstance - The instance to copypublic static <S,D> ImmutableDerive.Builder<S,D> builder()
ImmutableDerive.
ImmutableDerive.<S, D>builder()
.source(de.flapdoodle.reverse.StateID<S>) // required source
.destination(de.flapdoodle.reverse.StateID<D>) // required destination
.action(function.Function<S, de.flapdoodle.reverse.State<D>>) // required action
.transitionLabel(String) // optional transitionLabel
.build();
S - generic parameter SD - generic parameter DCopyright © 2023. All rights reserved.