Package io.vavr

Class API.For1Try<T1>

  • Enclosing class:
    API

    public static class API.For1Try<T1>
    extends java.lang.Object
    For-comprehension with one Try.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Try<T1> ts1  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private For1Try​(Try<T1> ts1)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Try<T1> yield()
      A shortcut for yield(Function.identity()).
      <R> Try<R> yield​(java.util.function.Function<? super T1,​? extends R> f)
      Yields a result for elements of the cross product of the underlying Try.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ts1

        private final Try<T1> ts1
    • Constructor Detail

      • For1Try

        private For1Try​(Try<T1> ts1)
    • Method Detail

      • yield

        public <R> Try<R> yield​(java.util.function.Function<? super T1,​? extends R> f)
        Yields a result for elements of the cross product of the underlying Try.
        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
      • yield

        public Try<T1> yield()
        A shortcut for yield(Function.identity()).
        Returns:
        an Iterator of mapped results