RxBox.Default<T>Box.Dbl, Box.Int, Box.Nullable<T>| Modifier | Constructor and Description |
|---|---|
protected |
RxOptional(Optional<T> initial)
Initially holds the given value.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> RxOptional<T> |
of(Optional<T> value)
Returns an RxOptional of the given value.
|
static <T> RxOptional<T> |
ofEmpty()
Returns an empty RxOptional.
|
static <T> RxOptional<T> |
ofValue(T value)
Returns an empty RxOptional.
|
void |
setEmpty()
Shortcut for
set(Optional.ofEmpty()). |
void |
setValue(T value)
Shortcut for
set(Optional.of(value)). |
asObservable, get, setclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcombineLatest, from, mappublic static <T> RxOptional<T> ofEmpty()
public static <T> RxOptional<T> ofValue(T value)
public static <T> RxOptional<T> of(Optional<T> value)
public void setValue(T value)
set(Optional.of(value)).public void setEmpty()
set(Optional.ofEmpty()).