| Modifier and Type | Method and Description |
|---|---|
<R> Box<R> |
Box.map(FnTR<T,R> mapFn)
Converts box content to a new content in a box.
|
<R> Box<R> |
Box.map(FnTR<T,R> mapFn,
R fallback)
Converts box content to a new content in a box.
|
static <T> Box<T> |
Box.of(T obj)
Static constructor:
|
Box<T> |
Box.or(T fallback)
If the box is empty, returns the box with the fallback value
|
Box<T> |
Box.orElse(FnR<T> fallbackFn)
If the box is empty, returns the box with the fallback value
|
<E extends Throwable> |
Box.orThrow(E exception)
If the box is empty (content is null), throw an exception.
|
Box<T> |
Box.then(FnT<T> modFn)
View or modifying the box content.
|
Box<T> |
Box.thenSet(FnTR<T,T> modFn)
Replace the box content.
|
Copyright © 2023. All rights reserved.