public static final class ImmutableStateMapping.Builder<T> extends Object
ImmutableStateMapping.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
| Modifier and Type | Method and Description |
|---|---|
ImmutableStateMapping<T> |
build()
Builds a new
ImmutableStateMapping. |
ImmutableStateMapping.Builder<T> |
destination(StateID<T> destination)
Initializes the value for the
destination attribute. |
ImmutableStateMapping.Builder<T> |
from(StateMapping<T> instance)
Fill a builder with attribute values from the provided
StateMapping instance. |
ImmutableStateMapping.Builder<T> |
source(StateID<T> source)
Initializes the value for the
source attribute. |
public final ImmutableStateMapping.Builder<T> from(StateMapping<T> instance)
StateMapping instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final ImmutableStateMapping.Builder<T> source(StateID<T> source)
source attribute.source - The value for sourcethis builder for use in a chained invocationpublic final ImmutableStateMapping.Builder<T> destination(StateID<T> destination)
destination attribute.destination - The value for destinationthis builder for use in a chained invocationpublic ImmutableStateMapping<T> build()
ImmutableStateMapping.IllegalStateException - if any required attributes are missingCopyright © 2025. All rights reserved.