Package fj

Class Try


public final class Try extends Object
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    Try()
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <A, E extends 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 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 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 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 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 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 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 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 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 IOException> t)
     

    Methods inherited from class java.lang.Object

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

    • Try

      private Try()
  • Method Details

    • f

      public static <A, E extends 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 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 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 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 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 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 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 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 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 IOException> t)