@Generated(value="org.immutables.processor.ProxyProcessor") public final class ImmutableDurationValue extends Value.DurationValue
Value.DurationValue.
Use the builder to create immutable instances:
ImmutableDurationValue.builder().
Use the static factory method to create immutable instances:
ImmutableDurationValue.of().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableDurationValue.Builder
Builds instances of type
ImmutableDurationValue. |
Value.ArrayValue, Value.BooleanValue, Value.DateTimeValue, Value.DurationValue, Value.FailedWithException<T>, Value.MapValue, Value.NullValue, Value.NumberValue, Value.StringValue| Modifier and Type | Method and Description |
|---|---|
static ImmutableDurationValue.Builder |
builder()
Creates a builder for
ImmutableDurationValue. |
static ImmutableDurationValue |
copyOf(Value.DurationValue instance)
Creates an immutable copy of a
Value.DurationValue value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableDurationValue that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
wrapped. |
static ImmutableDurationValue |
of(Duration wrapped)
Construct a new immutable
DurationValue instance. |
ImmutableDurationValue |
withWrapped(Duration value)
Copy the current immutable object by setting a value for the
wrapped attribute. |
Duration |
wrapped() |
compareTopublic Duration wrapped()
public final ImmutableDurationValue withWrapped(Duration value)
wrapped attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for wrappedthis objectpublic boolean equals(Object another)
ImmutableDurationValue that have equal attribute values.public int hashCode()
wrapped.public static ImmutableDurationValue of(Duration wrapped)
DurationValue instance.wrapped - The value for the wrapped attributepublic static ImmutableDurationValue copyOf(Value.DurationValue instance)
Value.DurationValue 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 ImmutableDurationValue.Builder builder()
ImmutableDurationValue.
ImmutableDurationValue.builder()
.wrapped(java.time.Duration) // required wrapped
.build();
Copyright © 2024. All rights reserved.