@ParametersAreNonnullByDefault @Generated(value="org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableReadOnlyValue<O,T> extends ReadOnlyValue<O,T>
ReadOnlyValue.
Use the builder to create immutable instances:
ImmutableReadOnlyValue.builder().
Use the static factory method to create immutable instances:
ImmutableReadOnlyValue.of().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableReadOnlyValue.Builder<O,T>
Builds instances of type
ImmutableReadOnlyValue. |
| Modifier and Type | Method and Description |
|---|---|
static <O,T> ImmutableReadOnlyValue.Builder<O,T> |
builder()
Creates a builder for
ImmutableReadOnlyValue. |
static <O,T> ImmutableReadOnlyValue<O,T> |
copyOf(ReadOnlyValue<O,T> instance)
Creates an immutable copy of a
ReadOnlyValue value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableReadOnlyValue that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
id, property. |
Id<O> |
id() |
static <O,T> ImmutableReadOnlyValue<O,T> |
of(Id<O> id,
ReadOnlyProperty<O,T> property)
Construct a new immutable
ReadOnlyValue instance. |
protected ReadOnlyProperty<O,T> |
property() |
String |
toString()
Prints the immutable value
ReadOnlyValue with attribute values. |
ImmutableReadOnlyValue<O,T> |
withId(Id<O> value)
Copy the current immutable object by setting a value for the
id attribute. |
ImmutableReadOnlyValue<O,T> |
withProperty(ReadOnlyProperty<O,T> value)
Copy the current immutable object by setting a value for the
property attribute. |
asHumanReadable, getclone, finalize, getClass, notify, notifyAll, wait, wait, waitnamed, named, ofType, ofType, relatedTo, unvalidatedasHumanReadableprotected ReadOnlyProperty<O,T> property()
property in class ReadOnlyValue<O,T>property attributepublic final ImmutableReadOnlyValue<O,T> withId(Id<O> value)
id attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for idthis objectpublic final ImmutableReadOnlyValue<O,T> withProperty(ReadOnlyProperty<O,T> value)
property attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for propertythis objectpublic boolean equals(@Nullable Object another)
ImmutableReadOnlyValue that have equal attribute values.public int hashCode()
id, property.public String toString()
ReadOnlyValue with attribute values.public static <O,T> ImmutableReadOnlyValue<O,T> of(Id<O> id, ReadOnlyProperty<O,T> property)
ReadOnlyValue instance.O - generic parameter OT - generic parameter Tid - The value for the id attributeproperty - The value for the property attributepublic static <O,T> ImmutableReadOnlyValue<O,T> copyOf(ReadOnlyValue<O,T> instance)
ReadOnlyValue value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.O - generic parameter OT - generic parameter Tinstance - The instance to copypublic static <O,T> ImmutableReadOnlyValue.Builder<O,T> builder()
ImmutableReadOnlyValue.
ImmutableReadOnlyValue.<O, T>builder()
.id(de.flapdoodle.formula.types.Id<O>) // required id
.property(de.flapdoodle.formula.values.properties.ReadOnlyProperty<O, T>) // required property
.build();
O - generic parameter OT - generic parameter TCopyright © 2023. All rights reserved.