Package io.vavr

Class API.For2Try<T1,T2>

java.lang.Object
io.vavr.API.For2Try<T1,T2>
Enclosing class:
API

public static class API.For2Try<T1,T2> extends Object
For-comprehension with two Trys.
  • Field Details

    • ts1

      private final Try<T1> ts1
    • ts2

      private final Try<T2> ts2
  • Constructor Details

    • For2Try

      private For2Try(Try<T1> ts1, Try<T2> ts2)
  • Method Details

    • yield

      public <R> Try<R> yield(BiFunction<? super T1,? super T2,? extends R> f)
      Yields a result for elements of the cross product of the underlying Trys.
      Type Parameters:
      R - type of the resulting Try elements
      Parameters:
      f - a function that maps an element of the cross product to a result
      Returns:
      an Try of mapped results