Package fj

Class Try


  • public final class Try
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Try()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <A,​E extends java.lang.Exception>
      P1<Validation<E,​A>>
      f​(Try0<A,​E> t)
      Promotes the Try0 to a Validation that returns an Exception on the failure side and its result on the success side.
      static <A,​B,​E extends java.lang.Exception>
      F<A,​Validation<E,​B>>
      f​(Try1<A,​B,​E> t)
      Promotes the Try1 to a Validation that returns an Exception on the failure side and its result on the success side.
      static <A,​B,​C,​E extends java.lang.Exception>
      F2<A,​B,​Validation<E,​C>>
      f​(Try2<A,​B,​C,​E> t)
      Promotes the Try2 to a Validation that returns an Exception on the failure side and its result on the success side.
      static <A,​B,​C,​D,​E extends java.lang.Exception>
      F3<A,​B,​C,​Validation<E,​D>>
      f​(Try3<A,​B,​C,​D,​E> t)
      Promotes the Try3 to a Validation that returns an Exception on the failure side and its result on the success side.
      static <A,​B,​C,​D,​E,​Z extends java.lang.Exception>
      F4<A,​B,​C,​D,​Validation<Z,​E>>
      f​(Try4<A,​B,​C,​D,​E,​Z> t)
      Promotes the Try4 to a Validation that returns an Exception on the failure side and its result on the success side.
      static <A,​B,​C,​D,​E,​F,​Z extends java.lang.Exception>
      F5<A,​B,​C,​D,​E,​Validation<Z,​F>>
      f​(Try5<A,​B,​C,​D,​E,​F,​Z> t)
      Promotes the Try5 to a Validation that returns an Exception on the failure side and its result on the success side.
      static <A,​B,​C,​D,​E,​F,​G,​Z extends java.lang.Exception>
      F6<A,​B,​C,​D,​E,​F,​Validation<Z,​G>>
      f​(Try6<A,​B,​C,​D,​E,​F,​G,​Z> t)
      Promotes the Try6 to a Validation that returns an Exception on the failure side and its result on the success side.
      static <A,​B,​C,​D,​E,​F,​G,​H,​Z extends java.lang.Exception>
      F7<A,​B,​C,​D,​E,​F,​G,​Validation<Z,​H>>
      f​(Try7<A,​B,​C,​D,​E,​F,​G,​H,​Z> t)
      Promotes the Try7 to a Validation that returns an Exception on the failure side and its result on the success side.
      static <A,​B,​C,​D,​E,​F,​G,​H,​I,​Z extends java.lang.Exception>
      F8<A,​B,​C,​D,​E,​F,​G,​H,​Validation<Z,​I>>
      f​(Try8<A,​B,​C,​D,​E,​F,​G,​H,​I,​Z> t)
      Promotes the Try8 to a Validation that returns an Exception on the failure side and its result on the success side.
      static <A> IO<A> io​(Try0<A,​? extends java.io.IOException> t)  
      • Methods inherited from class java.lang.Object

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

      • Try

        private Try()
    • Method Detail

      • f

        public static <A,​E extends java.lang.Exception> P1<Validation<E,​A>> f​(Try0<A,​E> t)
        Promotes the Try0 to a Validation that returns an Exception on the failure side and its result on the success side.
        Parameters:
        t - A Try0 to promote
        Returns:
        A Validation with an Exception on the failure side and its result on the success side.
      • f

        public static <A,​B,​E extends java.lang.Exception> F<A,​Validation<E,​B>> f​(Try1<A,​B,​E> t)
        Promotes the Try1 to a Validation that returns an Exception on the failure side and its result on the success side.
        Parameters:
        t - A Try1 to promote
        Returns:
        A Validation with an Exception on the failure side and its result on the success side.
      • f

        public static <A,​B,​C,​E extends java.lang.Exception> F2<A,​B,​Validation<E,​C>> f​(Try2<A,​B,​C,​E> t)
        Promotes the Try2 to a Validation that returns an Exception on the failure side and its result on the success side.
        Parameters:
        t - A Try2 to promote
        Returns:
        A Validation with an Exception on the failure side and its result on the success side.
      • f

        public static <A,​B,​C,​D,​E extends java.lang.Exception> F3<A,​B,​C,​Validation<E,​D>> f​(Try3<A,​B,​C,​D,​E> t)
        Promotes the Try3 to a Validation that returns an Exception on the failure side and its result on the success side.
        Parameters:
        t - A Try3 to promote
        Returns:
        A Validation with an Exception on the failure side and its result on the success side.
      • f

        public static <A,​B,​C,​D,​E,​Z extends java.lang.Exception> F4<A,​B,​C,​D,​Validation<Z,​E>> f​(Try4<A,​B,​C,​D,​E,​Z> t)
        Promotes the Try4 to a Validation that returns an Exception on the failure side and its result on the success side.
        Parameters:
        t - A Try4 to promote
        Returns:
        A Validation with an Exception on the failure side and its result on the success side.
      • f

        public static <A,​B,​C,​D,​E,​F,​Z extends java.lang.Exception> F5<A,​B,​C,​D,​E,​Validation<Z,​F>> f​(Try5<A,​B,​C,​D,​E,​F,​Z> t)
        Promotes the Try5 to a Validation that returns an Exception on the failure side and its result on the success side.
        Parameters:
        t - A Try5 to promote
        Returns:
        A Validation with an Exception on the failure side and its result on the success side.
      • f

        public static <A,​B,​C,​D,​E,​F,​G,​Z extends java.lang.Exception> F6<A,​B,​C,​D,​E,​F,​Validation<Z,​G>> f​(Try6<A,​B,​C,​D,​E,​F,​G,​Z> t)
        Promotes the Try6 to a Validation that returns an Exception on the failure side and its result on the success side.
        Parameters:
        t - A Try6 to promote
        Returns:
        A Validation with an Exception on the failure side and its result on the success side.
      • f

        public static <A,​B,​C,​D,​E,​F,​G,​H,​Z extends java.lang.Exception> F7<A,​B,​C,​D,​E,​F,​G,​Validation<Z,​H>> f​(Try7<A,​B,​C,​D,​E,​F,​G,​H,​Z> t)
        Promotes the Try7 to a Validation that returns an Exception on the failure side and its result on the success side.
        Parameters:
        t - A Try7 to promote
        Returns:
        A Validation with an Exception on the failure side and its result on the success side.
      • f

        public static <A,​B,​C,​D,​E,​F,​G,​H,​I,​Z extends java.lang.Exception> F8<A,​B,​C,​D,​E,​F,​G,​H,​Validation<Z,​I>> f​(Try8<A,​B,​C,​D,​E,​F,​G,​H,​I,​Z> t)
        Promotes the Try8 to a Validation that returns an Exception on the failure side and its result on the success side.
        Parameters:
        t - A Try8 to promote
        Returns:
        A Validation with an Exception on the failure side and its result on the success side.
      • io

        public static <A> IO<A> io​(Try0<A,​? extends java.io.IOException> t)