| Modifier and Type | Method and Description |
|---|---|
Box<T> |
Box.eval(Fx10<T> evalFn)
Evaluate the value regardless of whether the box is empty or not.
|
<R> Box<R> |
Box.map(Fx11<T,R> mapFn)
Converts box content to a new content in a box.
|
static <R> Box<R> |
Box.of(Fx01<R> fx)
Static constructor:
|
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(Fx01<T> valueFn)
If the box is empty, returns the box with a new value
|
Box<T> |
Box.reset(T newValue)
Regardless of the box's state (whether full or not), set the content of the box.
|
<R> Box<R> |
Box.set(Fx01<R> setFn)
Regardless of the box's state (whether full or not), set the content of the box.
|
Box<T> |
Box.skip(FxBool<T> skipFn)
If the condition function returns true, empty the box.
|
Box<T> |
Box.then(Fx10<T> modFn)
View or modifying the box content.
|
Box<T> |
Box.thenSet(FxUnary<T> modFn)
Replace the box content.
|
<X extends Throwable> |
Box.validate(FxBool<T> validationFn,
X throwable)
Validate the box with validation function.
|
Copyright © 2023. All rights reserved.