@ParametersAreNonnullByDefault @Generated(value="org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableSample extends Object implements Sample
Sample.
Use the builder to create immutable instances:
ImmutableSample.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableSample.Builder
Builds instances of type
ImmutableSample. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableSample.Builder |
builder()
Creates a builder for
ImmutableSample. |
com.google.common.collect.ImmutableMap<BackupClusterUid,Optional<Long>> |
components()
The component samples that contribute to the total value.
|
static ImmutableSample |
copyOf(Sample instance)
Creates an immutable copy of a
Sample value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableSample that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
timestamp, value, components. |
Instant |
timestamp()
The timestamp of the sample.
|
String |
toString()
Prints the immutable value
Sample with attribute values. |
Optional<Long> |
value()
The value in bytes.
|
ImmutableSample |
withComponents(Map<? extends BackupClusterUid,? extends Optional<Long>> entries)
Copy the current immutable object by replacing the
components map with the specified map. |
ImmutableSample |
withTimestamp(Instant value)
Copy the current immutable object by setting a value for the
timestamp attribute. |
ImmutableSample |
withValue(long value)
Copy the current immutable object by setting a present value for the optional
value attribute. |
ImmutableSample |
withValue(Optional<Long> optional)
Copy the current immutable object by setting an optional value for the
value attribute. |
public Instant timestamp()
public com.google.common.collect.ImmutableMap<BackupClusterUid,Optional<Long>> components()
components in interface SampleMap of BackupClusterUid keys to value in bytespublic final ImmutableSample withTimestamp(Instant value)
timestamp attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for timestampthis objectpublic final ImmutableSample withValue(long value)
value attribute.value - The value for valuethis objectpublic final ImmutableSample withValue(Optional<Long> optional)
value attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for valuethis objectpublic final ImmutableSample withComponents(Map<? extends BackupClusterUid,? extends Optional<Long>> entries)
components map with the specified map.
Nulls are not permitted as keys or values.
A shallow reference equality check is used to prevent copying of the same value by returning this.entries - The entries to be added to the components mapthis objectpublic boolean equals(@Nullable Object another)
ImmutableSample that have equal attribute values.public int hashCode()
timestamp, value, components.public String toString()
Sample with attribute values.public static ImmutableSample copyOf(Sample instance)
Sample 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 ImmutableSample.Builder builder()
ImmutableSample.
ImmutableSample.builder()
.timestamp(java.time.Instant) // required timestamp
.value(Long) // optional value
.putComponents|putAllComponents(com.iland.cohesity.iaas.backups.common.model.BackupClusterUid => Optional<Long>) // components mappings
.build();
Copyright © 2023 iland Internet Solutions, Corp. All rights reserved.