@NotThreadSafe public static final class ImmutableDiskPartition.Builder extends Object
ImmutableDiskPartition.
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 |
|---|---|
ImmutableDiskPartition |
build()
Builds a new
ImmutableDiskPartition. |
ImmutableDiskPartition.Builder |
from(DiskPartition instance)
Fill a builder with attribute values from the provided
DiskPartition instance. |
ImmutableDiskPartition.Builder |
lengthBytes(long lengthBytes)
Initializes the value for the
lengthBytes attribute. |
ImmutableDiskPartition.Builder |
number(long number)
Initializes the value for the
number attribute. |
ImmutableDiskPartition.Builder |
offsetBytes(long offsetBytes)
Initializes the value for the
offsetBytes attribute. |
ImmutableDiskPartition.Builder |
typeUuid(String typeUuid)
Initializes the value for the
typeUuid attribute. |
ImmutableDiskPartition.Builder |
uuid(Optional<String> uuid)
Initializes the optional value
uuid to uuid. |
ImmutableDiskPartition.Builder |
uuid(String uuid)
Initializes the optional value
uuid to uuid. |
public final ImmutableDiskPartition.Builder from(DiskPartition instance)
DiskPartition 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 ImmutableDiskPartition.Builder lengthBytes(long lengthBytes)
lengthBytes attribute.lengthBytes - The value for lengthBytesthis builder for use in a chained invocationpublic final ImmutableDiskPartition.Builder number(long number)
number attribute.number - The value for numberthis builder for use in a chained invocationpublic final ImmutableDiskPartition.Builder offsetBytes(long offsetBytes)
offsetBytes attribute.offsetBytes - The value for offsetBytesthis builder for use in a chained invocationpublic final ImmutableDiskPartition.Builder typeUuid(String typeUuid)
typeUuid attribute.typeUuid - The value for typeUuidthis builder for use in a chained invocationpublic final ImmutableDiskPartition.Builder uuid(String uuid)
uuid to uuid.uuid - The value for uuidthis builder for chained invocationpublic final ImmutableDiskPartition.Builder uuid(Optional<String> uuid)
uuid to uuid.uuid - The value for uuidthis builder for use in a chained invocationpublic ImmutableDiskPartition build()
ImmutableDiskPartition.IllegalStateException - if any required attributes are missingCopyright © 2023 iland Internet Solutions, Corp. All rights reserved.