Class Remote


  • public class Remote
    extends Object
    Helper interfaces and methods that enable capture of standard JDK functional interfaces as serializable lambdas.
    Since:
    12.2.1
    Author:
    as 2014.07.16
    • Constructor Detail

      • Remote

        public Remote()
    • Method Detail

      • consumer

        public static <T> Remote.Consumer<T> consumer​(Remote.Consumer<T> consumer)
        Capture serializable Consumer.
        Type Parameters:
        T - the type of the input to the operation
        Parameters:
        consumer - lambda to capture
        Returns:
        serializable Consumer
      • biConsumer

        public static <T,​U> Remote.BiConsumer<T,​U> biConsumer​(Remote.BiConsumer<T,​U> biConsumer)
        Capture serializable BiConsumer.
        Type Parameters:
        T - the type of the input to the operation
        U - the type of the second argument to the operation
        Parameters:
        biConsumer - lambda to capture
        Returns:
        serializable BiConsumer
      • doubleConsumer

        public static Remote.DoubleConsumer doubleConsumer​(Remote.DoubleConsumer consumer)
        Capture serializable DoubleConsumer.
        Parameters:
        consumer - lambda to capture
        Returns:
        serializable DoubleConsumer
      • intConsumer

        public static Remote.IntConsumer intConsumer​(Remote.IntConsumer consumer)
        Capture serializable IntConsumer.
        Parameters:
        consumer - lambda to capture
        Returns:
        serializable IntConsumer
      • longConsumer

        public static Remote.LongConsumer longConsumer​(Remote.LongConsumer consumer)
        Capture serializable LongConsumer.
        Parameters:
        consumer - lambda to capture
        Returns:
        serializable LongConsumer
      • objDoubleConsumer

        public static <T> Remote.ObjDoubleConsumer<T> objDoubleConsumer​(Remote.ObjDoubleConsumer<T> consumer)
        Capture serializable ObjDoubleConsumer.
        Type Parameters:
        T - the type of the object argument to the operation
        Parameters:
        consumer - lambda to capture
        Returns:
        serializable ObjDoubleConsumer
      • objIntConsumer

        public static <T> Remote.ObjIntConsumer<T> objIntConsumer​(Remote.ObjIntConsumer<T> consumer)
        Capture serializable ObjIntConsumer.
        Type Parameters:
        T - the type of the object argument to the operation
        Parameters:
        consumer - lambda to capture
        Returns:
        serializable ObjIntConsumer
      • objLongConsumer

        public static <T> Remote.ObjLongConsumer<T> objLongConsumer​(Remote.ObjLongConsumer<T> consumer)
        Capture serializable ObjLongConsumer.
        Type Parameters:
        T - the type of the object argument to the operation
        Parameters:
        consumer - lambda to capture
        Returns:
        serializable ObjLongConsumer
      • function

        public static <T,​R> Remote.Function<T,​R> function​(Remote.Function<T,​R> function)
        Capture serializable Function.
        Type Parameters:
        T - the type of the input to the function
        R - the type of the result of the function
        Parameters:
        function - lambda to capture
        Returns:
        serializable Function
      • biFunction

        public static <T,​U,​R> Remote.BiFunction<T,​U,​R> biFunction​(Remote.BiFunction<T,​U,​R> biFunction)
        Capture serializable BiFunction.
        Type Parameters:
        T - the type of the first argument to the function
        U - the type of the second argument to the function
        R - the type of the result of the function
        Parameters:
        biFunction - lambda to capture
        Returns:
        serializable BiFunction
      • doubleFunction

        public static <R> Remote.DoubleFunction<R> doubleFunction​(Remote.DoubleFunction<R> function)
        Capture serializable DoubleFunction.
        Type Parameters:
        R - the type of the result of the function
        Parameters:
        function - lambda to capture
        Returns:
        serializable DoubleFunction
      • intFunction

        public static <R> Remote.IntFunction<R> intFunction​(Remote.IntFunction<R> function)
        Capture serializable IntFunction.
        Type Parameters:
        R - the type of the result of the function
        Parameters:
        function - lambda to capture
        Returns:
        serializable IntFunction
      • longFunction

        public static <R> Remote.LongFunction<R> longFunction​(Remote.LongFunction<R> function)
        Capture serializable LongFunction.
        Type Parameters:
        R - the type of the result of the function
        Parameters:
        function - lambda to capture
        Returns:
        serializable LongFunction
      • toDoubleFunction

        public static <T> Remote.ToDoubleFunction<T> toDoubleFunction​(Remote.ToDoubleFunction<T> function)
        Capture serializable ToDoubleFunction.
        Type Parameters:
        T - the type of the input to the function
        Parameters:
        function - lambda to capture
        Returns:
        serializable ToDoubleFunction
      • toIntFunction

        public static <T> Remote.ToIntFunction<T> toIntFunction​(Remote.ToIntFunction<T> function)
        Capture serializable ToIntFunction.
        Type Parameters:
        T - the type of the input to the function
        Parameters:
        function - lambda to capture
        Returns:
        serializable ToIntFunction
      • toLongFunction

        public static <T> Remote.ToLongFunction<T> toLongFunction​(Remote.ToLongFunction<T> function)
        Capture serializable ToLongFunction.
        Type Parameters:
        T - the type of the input to the function
        Parameters:
        function - lambda to capture
        Returns:
        serializable ToLongFunction
      • toDoubleBiFunction

        public static <T,​U> Remote.ToDoubleBiFunction<T,​U> toDoubleBiFunction​(Remote.ToDoubleBiFunction<T,​U> biFunction)
        Capture serializable ToDoubleBiFunction.
        Type Parameters:
        T - the type of the first argument to the function
        U - the type of the second argument to the function
        Parameters:
        biFunction - lambda to capture
        Returns:
        serializable ToDoubleBiFunction
      • toIntBiFunction

        public static <T,​U> Remote.ToIntBiFunction<T,​U> toIntBiFunction​(Remote.ToIntBiFunction<T,​U> biFunction)
        Capture serializable ToIntBiFunction.
        Type Parameters:
        T - the type of the first argument to the function
        U - the type of the second argument to the function
        Parameters:
        biFunction - lambda to capture
        Returns:
        serializable ToIntBiFunction
      • toLongBiFunction

        public static <T,​U> Remote.ToLongBiFunction<T,​U> toLongBiFunction​(Remote.ToLongBiFunction<T,​U> biFunction)
        Capture serializable ToLongBiFunction.
        Type Parameters:
        T - the type of the first argument to the function
        U - the type of the second argument to the function
        Parameters:
        biFunction - lambda to capture
        Returns:
        serializable ToLongBiFunction
      • predicate

        public static <T> Remote.Predicate<T> predicate​(Remote.Predicate<T> predicate)
        Capture serializable Predicate.
        Type Parameters:
        T - the type of the input to the predicate
        Parameters:
        predicate - lambda to capture
        Returns:
        serializable Predicate
      • biPredicate

        public static <T,​U> Remote.BiPredicate<T,​U> biPredicate​(Remote.BiPredicate<T,​U> biPredicate)
        Capture serializable BiPredicate.
        Type Parameters:
        T - the type of the first argument to the predicate
        U - the type of the second argument the predicate
        Parameters:
        biPredicate - lambda to capture
        Returns:
        serializable BiPredicate
      • doublePredicate

        public static Remote.DoublePredicate doublePredicate​(Remote.DoublePredicate predicate)
        Capture serializable DoublePredicate.
        Parameters:
        predicate - lambda to capture
        Returns:
        serializable DoublePredicate
      • intPredicate

        public static Remote.IntPredicate intPredicate​(Remote.IntPredicate predicate)
        Capture serializable IntPredicate.
        Parameters:
        predicate - lambda to capture
        Returns:
        serializable IntPredicate
      • longPredicate

        public static Remote.LongPredicate longPredicate​(Remote.LongPredicate predicate)
        Capture serializable LongPredicate.
        Parameters:
        predicate - lambda to capture
        Returns:
        serializable LongPredicate
      • supplier

        public static <T> Remote.Supplier<T> supplier​(Remote.Supplier<T> supplier)
        Capture serializable Supplier.
        Type Parameters:
        T - the type of results supplied by this supplier
        Parameters:
        supplier - lambda to capture
        Returns:
        serializable Supplier
      • booleanSupplier

        public static Remote.BooleanSupplier booleanSupplier​(Remote.BooleanSupplier supplier)
        Capture serializable BooleanSupplier.
        Parameters:
        supplier - lambda to capture
        Returns:
        serializable BooleanSupplier
      • doubleSupplier

        public static Remote.DoubleSupplier doubleSupplier​(Remote.DoubleSupplier supplier)
        Capture serializable DoubleSupplier.
        Parameters:
        supplier - lambda to capture
        Returns:
        serializable DoubleSupplier
      • intSupplier

        public static Remote.IntSupplier intSupplier​(Remote.IntSupplier supplier)
        Capture serializable IntSupplier.
        Parameters:
        supplier - lambda to capture
        Returns:
        serializable IntSupplier
      • longSupplier

        public static Remote.LongSupplier longSupplier​(Remote.LongSupplier supplier)
        Capture serializable LongSupplier.
        Parameters:
        supplier - lambda to capture
        Returns:
        serializable LongSupplier
      • binaryOperator

        public static <T> Remote.BinaryOperator<T> binaryOperator​(Remote.BinaryOperator<T> operator)
        Capture serializable BinaryOperator.
        Type Parameters:
        T - the type of the operands and result of the operator
        Parameters:
        operator - lambda to capture
        Returns:
        serializable BinaryOperator
      • unaryOperator

        public static <T> Remote.UnaryOperator<T> unaryOperator​(Remote.UnaryOperator<T> operator)
        Capture serializable UnaryOperator.
        Type Parameters:
        T - the type of the operand and result of the operator
        Parameters:
        operator - lambda to capture
        Returns:
        serializable UnaryOperator
      • intUnaryOperator

        public static Remote.IntUnaryOperator intUnaryOperator​(Remote.IntUnaryOperator operator)
        Capture serializable IntUnaryOperator.
        Parameters:
        operator - lambda to capture
        Returns:
        serializable IntUnaryOperator
      • comparator

        public static <T> Remote.Comparator<T> comparator​(Remote.Comparator<T> comparator)
        Capture serializable Comparator.
        Parameters:
        comparator - lambda to capture
        Returns:
        serializable Comparator
      • runnable

        public static Remote.Runnable runnable​(Remote.Runnable runnable)
        Capture serializable Runnable.
        Parameters:
        runnable - lambda to capture
        Returns:
        serializable Runnable
      • callable

        public static <V> Remote.Callable<V> callable​(Remote.Callable<V> callable)
        Capture serializable Callable.
        Parameters:
        callable - lambda to capture
        Returns:
        serializable Callable