public static final class ImmutablePartingWay.Builder<S,A,B> extends Object
ImmutablePartingWay.
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 |
|---|---|
ImmutablePartingWay<S,A,B> |
build()
Builds a new
ImmutablePartingWay. |
ImmutablePartingWay.Builder<S,A,B> |
from(PartingWay<S,A,B> instance)
Fill a builder with attribute values from the provided
PartingWay instance. |
ImmutablePartingWay.Builder<S,A,B> |
oneDestination(NamedType<A> oneDestination)
Initializes the value for the
oneDestination attribute. |
ImmutablePartingWay.Builder<S,A,B> |
otherDestination(NamedType<B> otherDestination)
Initializes the value for the
otherDestination attribute. |
ImmutablePartingWay.Builder<S,A,B> |
start(NamedType<S> start)
Initializes the value for the
start attribute. |
public final ImmutablePartingWay.Builder<S,A,B> from(PartingWay<S,A,B> instance)
PartingWay 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 ImmutablePartingWay.Builder<S,A,B> start(NamedType<S> start)
start attribute.start - The value for startthis builder for use in a chained invocationpublic final ImmutablePartingWay.Builder<S,A,B> oneDestination(NamedType<A> oneDestination)
oneDestination attribute.oneDestination - The value for oneDestinationthis builder for use in a chained invocationpublic final ImmutablePartingWay.Builder<S,A,B> otherDestination(NamedType<B> otherDestination)
otherDestination attribute.otherDestination - The value for otherDestinationthis builder for use in a chained invocationpublic ImmutablePartingWay<S,A,B> build()
ImmutablePartingWay.IllegalStateException - if any required attributes are missingCopyright © 2017. All rights reserved.