@NotThreadSafe public static final class ImmutableFileSnapshotInfo.Builder extends Object
ImmutableFileSnapshotInfo.
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 |
|---|---|
ImmutableFileSnapshotInfo |
build()
Builds a new
ImmutableFileSnapshotInfo. |
ImmutableFileSnapshotInfo.Builder |
from(FileSnapshotInfo instance)
Fill a builder with attribute values from the provided
FileSnapshotInfo instance. |
ImmutableFileSnapshotInfo.Builder |
hasArchivalCopy(boolean hasArchivalCopy)
Initializes the value for the
hasArchivalCopy attribute. |
ImmutableFileSnapshotInfo.Builder |
hasLocalCopy(boolean hasLocalCopy)
Initializes the value for the
hasLocalCopy attribute. |
ImmutableFileSnapshotInfo.Builder |
hasRemoteCopy(boolean hasRemoteCopy)
Initializes the value for the
hasRemoteCopy attribute. |
ImmutableFileSnapshotInfo.Builder |
modifiedTime(Instant modifiedTime)
Initializes the optional value
modifiedTime to modifiedTime. |
ImmutableFileSnapshotInfo.Builder |
modifiedTime(Optional<? extends Instant> modifiedTime)
Initializes the optional value
modifiedTime to modifiedTime. |
ImmutableFileSnapshotInfo.Builder |
sizeBytes(long sizeBytes)
Initializes the value for the
sizeBytes attribute. |
ImmutableFileSnapshotInfo.Builder |
snapshot(SnapshotAttempt snapshot)
Initializes the value for the
snapshot attribute. |
public final ImmutableFileSnapshotInfo.Builder from(FileSnapshotInfo instance)
FileSnapshotInfo 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 ImmutableFileSnapshotInfo.Builder hasArchivalCopy(boolean hasArchivalCopy)
hasArchivalCopy attribute.hasArchivalCopy - The value for hasArchivalCopythis builder for use in a chained invocationpublic final ImmutableFileSnapshotInfo.Builder hasLocalCopy(boolean hasLocalCopy)
hasLocalCopy attribute.hasLocalCopy - The value for hasLocalCopythis builder for use in a chained invocationpublic final ImmutableFileSnapshotInfo.Builder hasRemoteCopy(boolean hasRemoteCopy)
hasRemoteCopy attribute.hasRemoteCopy - The value for hasRemoteCopythis builder for use in a chained invocationpublic final ImmutableFileSnapshotInfo.Builder modifiedTime(Instant modifiedTime)
modifiedTime to modifiedTime.modifiedTime - The value for modifiedTimethis builder for chained invocationpublic final ImmutableFileSnapshotInfo.Builder modifiedTime(Optional<? extends Instant> modifiedTime)
modifiedTime to modifiedTime.modifiedTime - The value for modifiedTimethis builder for use in a chained invocationpublic final ImmutableFileSnapshotInfo.Builder sizeBytes(long sizeBytes)
sizeBytes attribute.sizeBytes - The value for sizeBytesthis builder for use in a chained invocationpublic final ImmutableFileSnapshotInfo.Builder snapshot(SnapshotAttempt snapshot)
snapshot attribute.snapshot - The value for snapshotthis builder for use in a chained invocationpublic ImmutableFileSnapshotInfo build()
ImmutableFileSnapshotInfo.IllegalStateException - if any required attributes are missingCopyright © 2023 iland Internet Solutions, Corp. All rights reserved.