@ParametersAreNonnullByDefault @Generated(value="org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableReadOnlyProperty<O,T> extends ReadOnlyProperty<O,T>
ReadOnlyProperty.
Use the builder to create immutable instances:
ImmutableReadOnlyProperty.builder().
Use the static factory method to create immutable instances:
ImmutableReadOnlyProperty.of().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableReadOnlyProperty.Builder<O,T>
Builds instances of type
ImmutableReadOnlyProperty. |
| Modifier and Type | Method and Description |
|---|---|
static <O,T> ImmutableReadOnlyProperty.Builder<O,T> |
builder()
Creates a builder for
ImmutableReadOnlyProperty. |
static <O,T> ImmutableReadOnlyProperty<O,T> |
copyOf(ReadOnlyProperty<O,T> instance)
Creates an immutable copy of a
ReadOnlyProperty value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableReadOnlyProperty that have equal attribute values. |
protected Function<O,T> |
getter() |
int |
hashCode()
Computes a hash code from attributes:
type, name, getter. |
protected String |
name() |
static <O,T> ImmutableReadOnlyProperty<O,T> |
of(Class<O> type,
String name,
Function<O,T> getter)
Construct a new immutable
ReadOnlyProperty instance. |
protected Class<O> |
type() |
ImmutableReadOnlyProperty<O,T> |
withGetter(Function<O,T> value)
Copy the current immutable object by setting a value for the
getter attribute. |
ImmutableReadOnlyProperty<O,T> |
withName(String value)
Copy the current immutable object by setting a value for the
name attribute. |
ImmutableReadOnlyProperty<O,T> |
withType(Class<O> value)
Copy the current immutable object by setting a value for the
type attribute. |
asHumanReadable, get, toString, withIdclone, finalize, getClass, notify, notifyAll, wait, wait, waitasHumanReadableprotected Class<O> type()
type in class ReadOnlyProperty<O,T>type attributeprotected String name()
name in class ReadOnlyProperty<O,T>name attributeprotected Function<O,T> getter()
getter in class ReadOnlyProperty<O,T>getter attributepublic final ImmutableReadOnlyProperty<O,T> withType(Class<O> value)
type attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for typethis objectpublic final ImmutableReadOnlyProperty<O,T> withName(String value)
name attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for namethis objectpublic final ImmutableReadOnlyProperty<O,T> withGetter(Function<O,T> value)
getter attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for getterthis objectpublic boolean equals(@Nullable Object another)
ImmutableReadOnlyProperty that have equal attribute values.public int hashCode()
type, name, getter.public static <O,T> ImmutableReadOnlyProperty<O,T> of(Class<O> type, String name, Function<O,T> getter)
ReadOnlyProperty instance.O - generic parameter OT - generic parameter Ttype - The value for the type attributename - The value for the name attributegetter - The value for the getter attributepublic static <O,T> ImmutableReadOnlyProperty<O,T> copyOf(ReadOnlyProperty<O,T> instance)
ReadOnlyProperty 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> ImmutableReadOnlyProperty.Builder<O,T> builder()
ImmutableReadOnlyProperty.
ImmutableReadOnlyProperty.<O, T>builder()
.type(Class<O>) // required type
.name(String) // required name
.getter(function.Function<O, T>) // required getter
.build();
O - generic parameter OT - generic parameter TCopyright © 2023. All rights reserved.