public static final class ImmutableTransitionMapping.Builder<D> extends Object
ImmutableTransitionMapping.
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 |
|---|---|
ImmutableTransitionMapping.Builder<D> |
addAllMappings(Iterable<? extends StateMapping<?>> elements)
Adds elements to
mappings list. |
ImmutableTransitionMapping.Builder<D> |
addMappings(StateMapping<?>... elements)
Adds elements to
mappings list. |
ImmutableTransitionMapping.Builder<D> |
addMappings(StateMapping<?> element)
Adds one element to
mappings list. |
ImmutableTransitionMapping<D> |
build()
Builds a new
ImmutableTransitionMapping. |
ImmutableTransitionMapping.Builder<D> |
from(TransitionMapping<D> instance)
Fill a builder with attribute values from the provided
TransitionMapping instance. |
ImmutableTransitionMapping.Builder<D> |
mappings(Iterable<? extends StateMapping<?>> elements)
Sets or replaces all elements for
mappings list. |
public final ImmutableTransitionMapping.Builder<D> from(TransitionMapping<D> instance)
TransitionMapping instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.
Collection elements and entries will be added, not replaced.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final ImmutableTransitionMapping.Builder<D> addMappings(StateMapping<?> element)
mappings list.element - A mappings elementthis builder for use in a chained invocation@SafeVarargs public final ImmutableTransitionMapping.Builder<D> addMappings(StateMapping<?>... elements)
mappings list.elements - An array of mappings elementsthis builder for use in a chained invocationpublic final ImmutableTransitionMapping.Builder<D> mappings(Iterable<? extends StateMapping<?>> elements)
mappings list.elements - An iterable of mappings elementsthis builder for use in a chained invocationpublic final ImmutableTransitionMapping.Builder<D> addAllMappings(Iterable<? extends StateMapping<?>> elements)
mappings list.elements - An iterable of mappings elementsthis builder for use in a chained invocationpublic ImmutableTransitionMapping<D> build()
ImmutableTransitionMapping.IllegalStateException - if any required attributes are missingCopyright © 2025. All rights reserved.