@NotThreadSafe public static final class ImmutableTicketContext.Builder extends Object
ImmutableTicketContext
.
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 |
---|---|
ImmutableTicketContext |
build()
Builds a new
ImmutableTicketContext . |
ImmutableTicketContext.Builder |
from(TicketContext instance)
Fill a builder with attribute values from the provided
TicketContext instance. |
ImmutableTicketContext.Builder |
setCurrentAssignee(InsightUser currentAssignee)
Initializes the optional value
currentAssignee to currentAssignee. |
ImmutableTicketContext.Builder |
setCurrentAssignee(Optional<? extends InsightUser> currentAssignee)
Initializes the optional value
currentAssignee to currentAssignee. |
ImmutableTicketContext.Builder |
setCurrentProjectId(long currentProjectId)
Initializes the optional value
currentProjectId to currentProjectId. |
ImmutableTicketContext.Builder |
setCurrentProjectId(OptionalLong currentProjectId)
Initializes the optional value
currentProjectId to currentProjectId. |
ImmutableTicketContext.Builder |
setCurrentReporter(InsightUser currentReporter)
Initializes the optional value
currentReporter to currentReporter. |
ImmutableTicketContext.Builder |
setCurrentReporter(Optional<? extends InsightUser> currentReporter)
Initializes the optional value
currentReporter to currentReporter. |
@CanIgnoreReturnValue public final ImmutableTicketContext.Builder from(TicketContext instance)
TicketContext
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 ImmutableTicketContext.Builder setCurrentReporter(InsightUser currentReporter)
currentReporter
to currentReporter.currentReporter
- The value for currentReporterthis
builder for chained invocation@CanIgnoreReturnValue public final ImmutableTicketContext.Builder setCurrentReporter(Optional<? extends InsightUser> currentReporter)
currentReporter
to currentReporter.currentReporter
- The value for currentReporterthis
builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableTicketContext.Builder setCurrentAssignee(InsightUser currentAssignee)
currentAssignee
to currentAssignee.currentAssignee
- The value for currentAssigneethis
builder for chained invocation@CanIgnoreReturnValue public final ImmutableTicketContext.Builder setCurrentAssignee(Optional<? extends InsightUser> currentAssignee)
currentAssignee
to currentAssignee.currentAssignee
- The value for currentAssigneethis
builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableTicketContext.Builder setCurrentProjectId(long currentProjectId)
currentProjectId
to currentProjectId.currentProjectId
- The value for currentProjectIdthis
builder for chained invocation@CanIgnoreReturnValue public final ImmutableTicketContext.Builder setCurrentProjectId(OptionalLong currentProjectId)
currentProjectId
to currentProjectId.currentProjectId
- The value for currentProjectIdthis
builder for use in a chained invocationpublic ImmutableTicketContext build()
ImmutableTicketContext
.IllegalStateException
- if any required attributes are missingCopyright © 2024 Atlassian. All rights reserved.