@NotThreadSafe public static final class ImmutableAttachmentBean.Builder extends Object
ImmutableAttachmentBean.
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 |
|---|---|
ImmutableAttachmentBean |
build()
Builds a new
ImmutableAttachmentBean. |
ImmutableAttachmentBean.Builder |
from(AttachmentBean instance)
Fill a builder with attribute values from the provided
AttachmentBean instance. |
ImmutableAttachmentBean.Builder |
setAuthor(String author)
Initializes the value for the
author attribute. |
ImmutableAttachmentBean.Builder |
setComment(String comment)
Initializes the value for the
comment attribute. |
ImmutableAttachmentBean.Builder |
setCreated(Date created)
Initializes the value for the
created attribute. |
ImmutableAttachmentBean.Builder |
setFilename(String filename)
Initializes the value for the
filename attribute. |
ImmutableAttachmentBean.Builder |
setFileSize(Long fileSize)
Initializes the value for the
fileSize attribute. |
ImmutableAttachmentBean.Builder |
setId(Integer id)
Initializes the value for the
id attribute. |
ImmutableAttachmentBean.Builder |
setMimeType(String mimeType)
Initializes the value for the
mimeType attribute. |
ImmutableAttachmentBean.Builder |
setNameInFileSystem(String nameInFileSystem)
Initializes the value for the
nameInFileSystem attribute. |
ImmutableAttachmentBean.Builder |
setObjectId(Integer objectId)
Initializes the value for the
objectId attribute. |
@CanIgnoreReturnValue public final ImmutableAttachmentBean.Builder from(AttachmentBean instance)
AttachmentBean 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 ImmutableAttachmentBean.Builder setId(@Nullable Integer id)
id attribute.id - The value for id (can be null)this builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableAttachmentBean.Builder setObjectId(Integer objectId)
objectId attribute.objectId - The value for objectIdthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableAttachmentBean.Builder setAuthor(String author)
author attribute.author - The value for authorthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableAttachmentBean.Builder setComment(@Nullable String comment)
comment attribute.comment - The value for comment (can be null)this builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableAttachmentBean.Builder setFilename(String filename)
filename attribute.filename - The value for filenamethis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableAttachmentBean.Builder setMimeType(String mimeType)
mimeType attribute.mimeType - The value for mimeTypethis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableAttachmentBean.Builder setNameInFileSystem(String nameInFileSystem)
nameInFileSystem attribute.nameInFileSystem - The value for nameInFileSystemthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableAttachmentBean.Builder setFileSize(Long fileSize)
fileSize attribute.fileSize - The value for fileSizethis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableAttachmentBean.Builder setCreated(Date created)
created attribute.created - The value for createdthis builder for use in a chained invocationpublic ImmutableAttachmentBean build()
ImmutableAttachmentBean.IllegalStateException - if any required attributes are missingCopyright © 2024 Atlassian. All rights reserved.