default <R> ExceptionBiFunction<T, U, R, E> andThen(ExceptionLongFunction<R, E> after) { Assert.checkNotNullParam("after", after); return (t, u) -> after.apply(apply(t, u)); } }
default <R2> ExceptionLongFunction<R2, E> andThen(ExceptionFunction<? super R, ? extends R2, ? extends E> after) { Assert.checkNotNullParam("after", after); return t -> after.apply(apply(t)); }
default <T> ExceptionFunction<T, R, E> compose(ExceptionToLongFunction<? super T, ? extends E> before) { Assert.checkNotNullParam("before", before); return t -> apply(before.apply(t)); } }
default <R> ExceptionBiFunction<T, U, R, E> andThen(ExceptionLongFunction<R, E> after) { Assert.checkNotNullParam("after", after); return (t, u) -> after.apply(apply(t, u)); } }
default <R> ExceptionFunction<T, R, E> andThen(ExceptionLongFunction<? extends R, ? extends E> after) { Assert.checkNotNullParam("after", after); return t -> after.apply(apply(t)); }
default <R> ExceptionFunction<T, R, E> andThen(ExceptionLongFunction<R, E> after) { Assert.checkNotNullParam("after", after); return t -> after.apply(apply(t)); }
/** * Run the given task with this contextual object selected. * * @param function the task to run (must not be {@code null}) * @param value the parameter to pass to the task * @param <T> the return value type * @param <E> the exception type * @return the action return value * @throws E if an exception occurs in the task */ default <T, E extends Exception> T runExLongFunction(ExceptionLongFunction<T, E> function, long value) throws E { final ContextManager<C> contextManager = getInstanceContextManager(); final C old = contextManager.getAndSetCurrent(this); try { return function.apply(value); } finally { contextManager.restoreCurrent(old); } } }
default <R> ExceptionFunction<T, R, E> andThen(ExceptionLongFunction<R, E> after) { Assert.checkNotNullParam("after", after); return t -> after.apply(apply(t)); }
default <R> ExceptionBiFunction<T, U, R, E> andThen(ExceptionLongFunction<R, E> after) { Assert.checkNotNullParam("after", after); return (t, u) -> after.apply(apply(t, u)); } }
default <T> ExceptionFunction<T, R, E> compose(ExceptionToLongFunction<? super T, ? extends E> before) { Assert.checkNotNullParam("before", before); return t -> apply(before.apply(t)); } }
default <T> ExceptionFunction<T, R, E> compose(ExceptionToLongFunction<? super T, ? extends E> before) { Assert.checkNotNullParam("before", before); return t -> apply(before.apply(t)); } }
default <R> ExceptionBiFunction<T, U, R, E> andThen(ExceptionLongFunction<R, E> after) { Assert.checkNotNullParam("after", after); return (t, u) -> after.apply(apply(t, u)); } }
default <R> ExceptionBiFunction<T, U, R, E> andThen(ExceptionLongFunction<R, E> after) { Assert.checkNotNullParam("after", after); return (t, u) -> after.apply(apply(t, u)); } }
default <R> ExceptionBiFunction<T, U, R, E> andThen(ExceptionLongFunction<R, E> after) { Assert.checkNotNullParam("after", after); return (t, u) -> after.apply(apply(t, u)); } }
default <R> ExceptionFunction<T, R, E> andThen(ExceptionLongFunction<? extends R, ? extends E> after) { Assert.checkNotNullParam("after", after); return t -> after.apply(apply(t)); }
default <R2> ExceptionLongFunction<R2, E> andThen(ExceptionFunction<? super R, ? extends R2, ? extends E> after) { Assert.checkNotNullParam("after", after); return t -> after.apply(apply(t)); }
default <R> ExceptionFunction<T, R, E> andThen(ExceptionLongFunction<R, E> after) { Assert.checkNotNullParam("after", after); return t -> after.apply(apply(t)); }
default <R2> ExceptionLongFunction<R2, E> andThen(ExceptionFunction<? super R, ? extends R2, ? extends E> after) { Assert.checkNotNullParam("after", after); return t -> after.apply(apply(t)); }
default <R> ExceptionFunction<T, R, E> andThen(ExceptionLongFunction<? extends R, ? extends E> after) { Assert.checkNotNullParam("after", after); return t -> after.apply(apply(t)); }
/** * Run the given task with this contextual object selected. * * @param function the task to run (must not be {@code null}) * @param value the parameter to pass to the task * @param <T> the return value type * @param <E> the exception type * @return the action return value * @throws E if an exception occurs in the task */ default <T, E extends Exception> T runExLongFunction(ExceptionLongFunction<T, E> function, long value) throws E { final ContextManager<C> contextManager = getInstanceContextManager(); final C old = contextManager.getAndSetCurrent(this); try { return function.apply(value); } finally { contextManager.restoreCurrent(old); } } }