@Value.Immutable public abstract class CopyOnChangeProperty<O,T> extends Object implements IsReadable<O,T>, IsChangeable<O,T>, HasHumanReadableLabel
| Constructor and Description |
|---|
CopyOnChangeProperty() |
| Modifier and Type | Method and Description |
|---|---|
String |
asHumanReadable() |
O |
change(O instance,
T value) |
protected abstract BiFunction<O,T,O> |
copyOnWrite() |
T |
get(O instance) |
protected abstract Function<O,T> |
getter() |
protected abstract String |
name() |
static <O,T> ImmutableCopyOnChangeProperty<O,T> |
of(Class<O> type,
String name,
Function<O,T> getter,
BiFunction<O,T,O> copyOnWrite) |
String |
toString() |
protected abstract Class<O> |
type() |
CopyOnChangeValue<O,T> |
withId(Id<O> id) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitasHumanReadable@Value.Parameter protected abstract String name()
@Value.Parameter protected abstract BiFunction<O,T,O> copyOnWrite()
public String asHumanReadable()
asHumanReadable in interface HasHumanReadableLabel@Value.Auxiliary public O change(O instance, T value)
change in interface IsChangeable<O,T>public CopyOnChangeValue<O,T> withId(Id<O> id)
public static <O,T> ImmutableCopyOnChangeProperty<O,T> of(Class<O> type, String name, Function<O,T> getter, BiFunction<O,T,O> copyOnWrite)
Copyright © 2023. All rights reserved.