Adds an additional Value to track, resulting in a new
Value2.
Value1.andOf(io.vavr.CheckedFunction1<? super C,? extends D> valueFunction)
Uses the existing value, if present, to create a new value to track.
Adds an additional Value to track, resulting in a new
Value2.
Returns an Value1 describing the given value, if
non-null, otherwise returns an empty Value1.
Value1.andOfNullable(io.vavr.CheckedFunction1<? super C,? extends D> valueFunction)
Uses the existing value, if present, to create a new value to track.
Returns an empty Value2 instance.
Value2.filter(io.vavr.CheckedPredicate<? super C> predicate)
If a value is present, and the value matches the given predicate,
returns an Value2 describing the value, otherwise returns an
empty Value2.
Value2.flatMap(io.vavr.CheckedFunction1<? super C,? extends Optional<? extends D>> mapper)
If a value is present, returns the result of applying the given
Value2-bearing mapping function to the value, otherwise returns
an empty Value2.
Perform the given action using all values, if present.
Value2.ifEmpty(io.vavr.CheckedRunnable emptyAction)
Performs the empty-based action if no value is present, otherwise does nothing.
Value2.ifPresent(io.vavr.CheckedConsumer<? super C> action)
If a value is present, performs the given action with the value,
otherwise does nothing.
Value2.ifPresentOrElse(io.vavr.CheckedConsumer<? super C> action,
io.vavr.CheckedRunnable emptyAction)
If a value is present, performs the given action with the value,
otherwise performs the given empty-based action.
Value2.map(io.vavr.CheckedFunction1<? super C,? extends U> mapper)
If a value is present, returns an Value2 describing (as if by
#ofNullable) the result of applying the given mapping function to
the value, otherwise returns an empty Value2.
ValueStack.of(A value1,
B value2)
Create a new value stack with the given initial values.
Create a new value stack with the given initial values.
Create a new value stack with the given initial values.
If a value is present, returns an Value2 describing the value,
otherwise returns an Value2 produced by the supplying function.
If a value is present, returns an Value2 describing the value,
otherwise returns an Value2 produced by the supplying function.
Value2.or(io.vavr.CheckedFunction0<? extends Optional<? extends C>> supplier)
If a value is present, returns an Value2 describing the value,
otherwise returns an Value2 produced by the supplying function.
Value2.or(io.vavr.CheckedFunction1<? super B,? extends C> valueFunction)
If the last added value is empty, use the given value function along with
all other present values to create a new value.
If a value is present, returns an Value2 describing the value,
otherwise returns an Value2 produced by the supplying function.