| Modifier and Type | Method and Description |
|---|---|
Box<T> |
Box.eval(FnT<T> evalFn)
Evaluate the value regardless of whether the box is empty or not.
|
<R> Box<R> |
Box.map(FnTR<T,R> mapFn)
Converts box content to a new content in a box.
|
static <T> Box<T> |
Box.of(T obj)
Static constructor:
|
Box<T> |
Box.or(Runnable r)
If the box is empty, execute the Runnable.
|
Box<T> |
Box.orSet(FnR<T> valueFn)
If the box is empty, returns the box with a new value
|
Box<T> |
Box.set(FnR<T> setFn)
Regardless of the box's state (whether full or not), set the content of the box.
|
Box<T> |
Box.skip(FnTRb<T> skipFn)
If the condition function returns true, empty the box.
|
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.
|
<X extends Throwable> |
Box.validate(FnTRb<T> validationFn,
X throwable)
Validate the box with validation function.
|
Copyright © 2023. All rights reserved.