Package rx.functions

Class Functions

java.lang.Object
rx.functions.Functions

public final class Functions extends Object
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static FuncN<Void>
    Converts an Action0 to a FuncN to allow heterogeneous handling of functions with different arities.
    static <T0> FuncN<Void>
    fromAction(Action1<? super T0> f)
    Converts an Action1 to a FuncN to allow heterogeneous handling of functions with different arities.
    static <T0, T1> FuncN<Void>
    fromAction(Action2<? super T0,? super T1> f)
    Converts an Action2 to a FuncN to allow heterogeneous handling of functions with different arities.
    static <T0, T1, T2>
    FuncN<Void>
    fromAction(Action3<? super T0,? super T1,? super T2> f)
    Converts an Action3 to a FuncN to allow heterogeneous handling of functions with different arities.
    static <R> FuncN<R>
    fromFunc(Func0<? extends R> f)
    Converts a Func0 to a FuncN to allow heterogeneous handling of functions with different arities.
    static <T0, R> FuncN<R>
    fromFunc(Func1<? super T0,? extends R> f)
    Converts a Func1 to a FuncN to allow heterogeneous handling of functions with different arities.
    static <T0, T1, R>
    FuncN<R>
    fromFunc(Func2<? super T0,? super T1,? extends R> f)
    Converts a Func2 to a FuncN to allow heterogeneous handling of functions with different arities.
    static <T0, T1, T2, R>
    FuncN<R>
    fromFunc(Func3<? super T0,? super T1,? super T2,? extends R> f)
    Converts a Func3 to a FuncN to allow heterogeneous handling of functions with different arities.
    static <T0, T1, T2, T3, R>
    FuncN<R>
    fromFunc(Func4<? super T0,? super T1,? super T2,? super T3,? extends R> f)
    Converts a Func4 to a FuncN to allow heterogeneous handling of functions with different arities.
    static <T0, T1, T2, T3, T4, R>
    FuncN<R>
    fromFunc(Func5<? super T0,? super T1,? super T2,? super T3,? super T4,? extends R> f)
    Converts a Func5 to a FuncN to allow heterogeneous handling of functions with different arities.
    static <T0, T1, T2, T3, T4, T5, R>
    FuncN<R>
    fromFunc(Func6<? super T0,? super T1,? super T2,? super T3,? super T4,? super T5,? extends R> f)
    Converts a Func6 to a FuncN to allow heterogeneous handling of functions with different arities.
    static <T0, T1, T2, T3, T4, T5, T6, R>
    FuncN<R>
    fromFunc(Func7<? super T0,? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? extends R> f)
    Converts a Func7 to a FuncN to allow heterogeneous handling of functions with different arities.
    static <T0, T1, T2, T3, T4, T5, T6, T7, R>
    FuncN<R>
    fromFunc(Func8<? super T0,? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? extends R> f)
    Converts a Func8 to a FuncN to allow heterogeneous handling of functions with different arities.
    static <T0, T1, T2, T3, T4, T5, T6, T7, T8, R>
    FuncN<R>
    fromFunc(Func9<? super T0,? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? extends R> f)
    Converts a Func9 to a FuncN to allow heterogeneous handling of functions with different arities.

    Methods inherited from class java.lang.Object

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

    • Functions

      private Functions()
  • Method Details

    • fromFunc

      public static <R> FuncN<R> fromFunc(Func0<? extends R> f)
      Converts a Func0 to a FuncN to allow heterogeneous handling of functions with different arities.
      Type Parameters:
      R - the result type
      Parameters:
      f - the Func0 to convert
      Returns:
      a FuncN representation of f
    • fromFunc

      public static <T0, R> FuncN<R> fromFunc(Func1<? super T0,? extends R> f)
      Converts a Func1 to a FuncN to allow heterogeneous handling of functions with different arities.
      Type Parameters:
      T0 - the first argument type
      R - the result type
      Parameters:
      f - the Func1 to convert
      Returns:
      a FuncN representation of f
    • fromFunc

      public static <T0, T1, R> FuncN<R> fromFunc(Func2<? super T0,? super T1,? extends R> f)
      Converts a Func2 to a FuncN to allow heterogeneous handling of functions with different arities.
      Type Parameters:
      T0 - the first argument type
      T1 - the second argument type
      R - the result type
      Parameters:
      f - the Func2 to convert
      Returns:
      a FuncN representation of f
    • fromFunc

      public static <T0, T1, T2, R> FuncN<R> fromFunc(Func3<? super T0,? super T1,? super T2,? extends R> f)
      Converts a Func3 to a FuncN to allow heterogeneous handling of functions with different arities.
      Type Parameters:
      T0 - the first argument type
      T1 - the second argument type
      T2 - the third argument type
      R - the result type
      Parameters:
      f - the Func3 to convert
      Returns:
      a FuncN representation of f
    • fromFunc

      public static <T0, T1, T2, T3, R> FuncN<R> fromFunc(Func4<? super T0,? super T1,? super T2,? super T3,? extends R> f)
      Converts a Func4 to a FuncN to allow heterogeneous handling of functions with different arities.
      Type Parameters:
      T0 - the first argument type
      T1 - the second argument type
      T2 - the third argument type
      T3 - the fourth argument type
      R - the result type
      Parameters:
      f - the Func4 to convert
      Returns:
      a FuncN representation of f
    • fromFunc

      public static <T0, T1, T2, T3, T4, R> FuncN<R> fromFunc(Func5<? super T0,? super T1,? super T2,? super T3,? super T4,? extends R> f)
      Converts a Func5 to a FuncN to allow heterogeneous handling of functions with different arities.
      Type Parameters:
      T0 - the first argument type
      T1 - the second argument type
      T2 - the third argument type
      T3 - the fourth argument type
      T4 - the fifth argument type
      R - the result type
      Parameters:
      f - the Func5 to convert
      Returns:
      a FuncN representation of f
    • fromFunc

      public static <T0, T1, T2, T3, T4, T5, R> FuncN<R> fromFunc(Func6<? super T0,? super T1,? super T2,? super T3,? super T4,? super T5,? extends R> f)
      Converts a Func6 to a FuncN to allow heterogeneous handling of functions with different arities.
      Type Parameters:
      T0 - the first argument type
      T1 - the second argument type
      T2 - the third argument type
      T3 - the fourth argument type
      T4 - the fifth argument type
      T5 - the sixth argument type
      R - the result type
      Parameters:
      f - the Func6 to convert
      Returns:
      a FuncN representation of f
    • fromFunc

      public static <T0, T1, T2, T3, T4, T5, T6, R> FuncN<R> fromFunc(Func7<? super T0,? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? extends R> f)
      Converts a Func7 to a FuncN to allow heterogeneous handling of functions with different arities.
      Type Parameters:
      T0 - the first argument type
      T1 - the second argument type
      T2 - the third argument type
      T3 - the fourth argument type
      T4 - the fifth argument type
      T5 - the sixth argument type
      T6 - the seventh argument type
      R - the result type
      Parameters:
      f - the Func7 to convert
      Returns:
      a FuncN representation of f
    • fromFunc

      public static <T0, T1, T2, T3, T4, T5, T6, T7, R> FuncN<R> fromFunc(Func8<? super T0,? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? extends R> f)
      Converts a Func8 to a FuncN to allow heterogeneous handling of functions with different arities.
      Type Parameters:
      T0 - the first argument type
      T1 - the second argument type
      T2 - the third argument type
      T3 - the fourth argument type
      T4 - the fifth argument type
      T5 - the sixth argument type
      T6 - the seventh argument type
      T7 - the eigth argument type
      R - the result type
      Parameters:
      f - the Func8 to convert
      Returns:
      a FuncN representation of f
    • fromFunc

      public static <T0, T1, T2, T3, T4, T5, T6, T7, T8, R> FuncN<R> fromFunc(Func9<? super T0,? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? extends R> f)
      Converts a Func9 to a FuncN to allow heterogeneous handling of functions with different arities.
      Type Parameters:
      T0 - the first argument type
      T1 - the second argument type
      T2 - the third argument type
      T3 - the fourth argument type
      T4 - the fifth argument type
      T5 - the sixth argument type
      T6 - the seventh argument type
      T7 - the eigth argument type
      T8 - the ninth argument type
      R - the result type
      Parameters:
      f - the Func9 to convert
      Returns:
      a FuncN representation of f
    • fromAction

      public static FuncN<Void> fromAction(Action0 f)
      Converts an Action0 to a FuncN to allow heterogeneous handling of functions with different arities.
      Parameters:
      f - the Action0 to convert
      Returns:
      a FuncN representation of f
    • fromAction

      public static <T0> FuncN<Void> fromAction(Action1<? super T0> f)
      Converts an Action1 to a FuncN to allow heterogeneous handling of functions with different arities.
      Type Parameters:
      T0 - the first argument type
      Parameters:
      f - the Action1 to convert
      Returns:
      a FuncN representation of f
    • fromAction

      public static <T0, T1> FuncN<Void> fromAction(Action2<? super T0,? super T1> f)
      Converts an Action2 to a FuncN to allow heterogeneous handling of functions with different arities.
      Type Parameters:
      T0 - the first argument type
      T1 - the second argument type
      Parameters:
      f - the Action2 to convert
      Returns:
      a FuncN representation of f
    • fromAction

      public static <T0, T1, T2> FuncN<Void> fromAction(Action3<? super T0,? super T1,? super T2> f)
      Converts an Action3 to a FuncN to allow heterogeneous handling of functions with different arities.
      Type Parameters:
      T0 - the first argument type
      T1 - the second argument type
      T2 - the third argument type
      Parameters:
      f - the Action3 to convert
      Returns:
      a FuncN representation of f