@NotThreadSafe public static final class ImmutableTicketType.Builder extends Object
ImmutableTicketType
.
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 |
---|---|
ImmutableTicketType |
build()
Builds a new
ImmutableTicketType . |
ImmutableTicketType.Builder |
from(TicketType instance)
Fill a builder with attribute values from the provided
TicketType instance. |
ImmutableTicketType.Builder |
setDescription(Optional<String> description)
Initializes the optional value
description to description. |
ImmutableTicketType.Builder |
setDescription(String description)
Initializes the optional value
description to description. |
ImmutableTicketType.Builder |
setIconUrl(Optional<String> iconUrl)
Initializes the optional value
iconUrl to iconUrl. |
ImmutableTicketType.Builder |
setIconUrl(String iconUrl)
Initializes the optional value
iconUrl to iconUrl. |
ImmutableTicketType.Builder |
setId(String id)
Initializes the value for the
id attribute. |
ImmutableTicketType.Builder |
setName(String name)
Initializes the value for the
name attribute. |
@CanIgnoreReturnValue public final ImmutableTicketType.Builder from(TicketType instance)
TicketType
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 ImmutableTicketType.Builder setId(String id)
id
attribute.id
- The value for idthis
builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableTicketType.Builder setName(String name)
name
attribute.name
- The value for namethis
builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableTicketType.Builder setDescription(String description)
description
to description.description
- The value for descriptionthis
builder for chained invocation@CanIgnoreReturnValue public final ImmutableTicketType.Builder setDescription(Optional<String> description)
description
to description.description
- The value for descriptionthis
builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableTicketType.Builder setIconUrl(String iconUrl)
iconUrl
to iconUrl.iconUrl
- The value for iconUrlthis
builder for chained invocation@CanIgnoreReturnValue public final ImmutableTicketType.Builder setIconUrl(Optional<String> iconUrl)
iconUrl
to iconUrl.iconUrl
- The value for iconUrlthis
builder for use in a chained invocationpublic ImmutableTicketType build()
ImmutableTicketType
.IllegalStateException
- if any required attributes are missingCopyright © 2024 Atlassian. All rights reserved.