public interface GetterSetter<T>
extends java.util.function.Supplier<T>
Modifier and Type | Interface and Description |
---|---|
static interface |
GetterSetter.Double
A GetterSetter for primitive doubles.
|
static interface |
GetterSetter.Int
A GetterSetter for primitive ints.
|
Modifier and Type | Method and Description |
---|---|
static <T> GetterSetter<T> |
from(java.util.function.Supplier<T> getter,
java.util.function.Consumer<T> setter)
Creates a GetterSetter from a Supplier and a Consumer.
|
static <T,V> GetterSetter<T> |
from(V target,
java.util.function.Function<V,T> getter,
java.util.function.BiConsumer<V,T> setter)
Creates a GetterSetter from an argument and two functions which operate on that argument.
|
void |
set(T value)
Sets the value which will later be returned by get().
|
void set(T value)
static <T> GetterSetter<T> from(java.util.function.Supplier<T> getter, java.util.function.Consumer<T> setter)
static <T,V> GetterSetter<T> from(V target, java.util.function.Function<V,T> getter, java.util.function.BiConsumer<V,T> setter)