@NotThreadSafe public static final class ImmutableProgressState.Builder extends Object
ImmutableProgressState
.
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 |
---|---|
ImmutableProgressState |
build()
Builds a new
ImmutableProgressState . |
ImmutableProgressState.Builder |
ended(Instant ended)
Initializes the optional value
ended to ended. |
ImmutableProgressState.Builder |
ended(Optional<? extends Instant> ended)
Initializes the optional value
ended to ended. |
ImmutableProgressState.Builder |
from(ProgressState instance)
Fill a builder with attribute values from the provided
ProgressState instance. |
ImmutableProgressState.Builder |
progressId(ProgressId progressId)
Initializes the value for the
progressId attribute. |
ImmutableProgressState.Builder |
result(Result result)
Initializes the value for the
result attribute. |
ImmutableProgressState.Builder |
started(Instant started)
Initializes the value for the
started attribute. |
@CanIgnoreReturnValue public final ImmutableProgressState.Builder from(ProgressState instance)
ProgressState
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 invocation@CanIgnoreReturnValue public final ImmutableProgressState.Builder progressId(ProgressId progressId)
progressId
attribute.progressId
- The value for progressIdthis
builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableProgressState.Builder started(Instant started)
started
attribute.started
- The value for startedthis
builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableProgressState.Builder ended(Instant ended)
ended
to ended.ended
- The value for endedthis
builder for chained invocation@CanIgnoreReturnValue public final ImmutableProgressState.Builder ended(Optional<? extends Instant> ended)
ended
to ended.ended
- The value for endedthis
builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableProgressState.Builder result(Result result)
result
attribute.result
- The value for resultthis
builder for use in a chained invocationpublic ImmutableProgressState build()
ImmutableProgressState
.IllegalStateException
- if any required attributes are missingCopyright © 2024 Atlassian. All rights reserved.