T
- item type.public interface ContextProperty<T> extends Serializable
Also provides the mutation capabilities in imperative and functional styles. Imperative is useful when we merely want to swap one value with another, whereas the functional one can be used when e.g. another element needs to be added to a collection.
Modifier and Type | Interface and Description |
---|---|
static class |
ContextProperty.Impl<T>
Default implementation of
ContextProperty . |
static class |
ContextProperty.Wrapper<T>
A wrapper around
ContextProperty . |
Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
log |
Modifier and Type | Method and Description |
---|---|
void |
mutate(io.reactivex.functions.Consumer<T> mutator) |
default T |
nullableValue() |
io.reactivex.disposables.Disposable |
observe(io.reactivex.functions.Consumer<Optional<T>> action) |
io.reactivex.disposables.Disposable |
observeNullable(io.reactivex.functions.Consumer<T> action) |
void |
set(T value) |
Optional<T> |
value() |
io.reactivex.disposables.Disposable observeNullable(io.reactivex.functions.Consumer<T> action)
io.reactivex.disposables.Disposable observe(io.reactivex.functions.Consumer<Optional<T>> action)
void set(T value)
void mutate(io.reactivex.functions.Consumer<T> mutator)
default T nullableValue()
Copyright © 2018 Magnolia International Ltd.. All rights reserved.