Class Functions



  • public final class Functions
    extends Object
    • Method Summary

      Methods

      Modifier and Type Method and Description
      static FuncN<Void> fromAction(Action0 f)
      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.
    • Method Detail

      • 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.
        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.
        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.
        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.
        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.
        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.
        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.
        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.
        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.
        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.
        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.
        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.
        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.
        Parameters:
        f - the Action3 to convert
        Returns:
        a FuncN representation of f