@ParametersAreNonnullByDefault @Generated(value="org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableDiskBlock extends Object implements DiskBlock
DiskBlock.
Use the builder to create immutable instances:
ImmutableDiskBlock.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableDiskBlock.Builder
Builds instances of type
ImmutableDiskBlock. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableDiskBlock.Builder |
builder()
Creates a builder for
ImmutableDiskBlock. |
static ImmutableDiskBlock |
copyOf(DiskBlock instance)
Creates an immutable copy of a
DiskBlock value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableDiskBlock that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
lengthBytes, offsetBytes. |
long |
lengthBytes()
Specifies the length of the block in bytes.
|
long |
offsetBytes()
Specifies the offset of the block (in bytes) from the beginning of the
containing object such as a physical disk or a virtual disk file.
|
String |
toString()
Prints the immutable value
DiskBlock with attribute values. |
ImmutableDiskBlock |
withLengthBytes(long value)
Copy the current immutable object by setting a value for the
lengthBytes attribute. |
ImmutableDiskBlock |
withOffsetBytes(long value)
Copy the current immutable object by setting a value for the
offsetBytes attribute. |
public long lengthBytes()
lengthBytes in interface DiskBlockpublic long offsetBytes()
offsetBytes in interface DiskBlockpublic final ImmutableDiskBlock withLengthBytes(long value)
lengthBytes attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for lengthBytesthis objectpublic final ImmutableDiskBlock withOffsetBytes(long value)
offsetBytes attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for offsetBytesthis objectpublic boolean equals(@Nullable Object another)
ImmutableDiskBlock that have equal attribute values.public int hashCode()
lengthBytes, offsetBytes.public String toString()
DiskBlock with attribute values.public static ImmutableDiskBlock copyOf(DiskBlock instance)
DiskBlock value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copypublic static ImmutableDiskBlock.Builder builder()
ImmutableDiskBlock.
ImmutableDiskBlock.builder()
.lengthBytes(long) // required lengthBytes
.offsetBytes(long) // required offsetBytes
.build();
Copyright © 2023 iland Internet Solutions, Corp. All rights reserved.