Uses of Class
com.terheyden.value.Value2

  • Uses of Value2 in com.terheyden.value

    Methods in com.terheyden.value that return Value2
    Modifier and Type
    Method
    Description
    <D> Value2<C,D>
    Value1.andOf(D value)
    Adds an additional Value to track, resulting in a new Value2.
    <D> Value2<C,D>
    Value1.andOf(io.vavr.CheckedFunction1<? super C,? extends D> valueFunction)
    Uses the existing value, if present, to create a new value to track.
    <D> Value2<C,D>
    Value1.andOf(Optional<? extends D> optValue)
    Adds an additional Value to track, resulting in a new Value2.
    <D> Value2<C,D>
    Value1.andOfNullable(D value)
    Returns an Value1 describing the given value, if non-null, otherwise returns an empty Value1.
    <D> Value2<C,D>
    Value1.andOfNullable(io.vavr.CheckedFunction1<? super C,? extends D> valueFunction)
    Uses the existing value, if present, to create a new value to track.
    static <X, Y> Value2<X,Y>
    Value2.empty()
    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.
    <D> Value2<B,D>
    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.
    Value2.ifAllPresent(CheckedConsumer2<? super B,? super C> action)
    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.
    <U> Value2<B,U>
    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.
    static <A, B> Value2<A,B>
    ValueStack.of(A value1, B value2)
    Create a new value stack with the given initial values.
    static <A, B> Value2<A,B>
    ValueStack.of(Optional<? extends A> optValue1, Optional<? extends B> optValue2)
    Create a new value stack with the given initial values.
    static <A, B> Value2<A,B>
    ValueStack.ofNullable(A value1, B value2)
    Create a new value stack with the given initial values.
    Value2.or(C useIfEmpty)
    If a value is present, returns an Value2 describing the value, otherwise returns an Value2 produced by the supplying function.
    Value2.or(Value1<? extends C> useIfEmpty)
    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.
    Value2.or(Optional<? extends C> useIfEmpty)
    If a value is present, returns an Value2 describing the value, otherwise returns an Value2 produced by the supplying function.