/** * Returns a composed {@link ThrowableBiLongToDoubleFunction} that first applies the {@code * before} functions to its input, and then applies this function to the result. This method is * just convenience, to provide the ability to execute an operation which accepts {@code long} * input, before this primitive function is executed. * * @param before1 The first function to apply before this function is applied * @param before2 The second function to apply before this function is applied * @return A composed {@code ThrowableBiLongToDoubleFunction} that first applies the {@code * before} functions to its input, and then applies this function to the result. * @throws NullPointerException If given argument is {@code null} * @implSpec The input argument of this method is a able to handle primitive values. In this case * this is {@code long}. */ @Nonnull default ThrowableBiLongToDoubleFunction<X> composeFromLong( @Nonnull final ThrowableLongFunction<? extends T, ? extends X> before1, @Nonnull final ThrowableLongToCharFunction<? extends X> before2) { Objects.requireNonNull(before1); Objects.requireNonNull(before2); return (value1, value2) -> applyAsDoubleThrows(before1.applyThrows(value1), before2.applyAsCharThrows(value2)); }
/** * Returns a composed {@link ThrowableTriLongToByteFunction} that first applies the {@code before} * functions to its input, and then applies this function to the result. This method is just * convenience, to provide the ability to execute an operation which accepts {@code long} input, * before this primitive function is executed. * * @param before1 The first function to apply before this function is applied * @param before2 The second predicate to apply before this function is applied * @param before3 The third predicate to apply before this function is applied * @return A composed {@code ThrowableTriLongToByteFunction} that first applies the {@code before} * functions to its input, and then applies this function to the result. * @throws NullPointerException If given argument is {@code null} * @implSpec The input argument of this method is a able to handle primitive values. In this case * this is {@code long}. */ @Nonnull default ThrowableTriLongToByteFunction<X> composeFromLong( @Nonnull final ThrowableLongFunction<? extends T, ? extends X> before1, @Nonnull final ThrowableLongPredicate<? extends X> before2, @Nonnull final ThrowableLongPredicate<? extends X> before3) { Objects.requireNonNull(before1); Objects.requireNonNull(before2); Objects.requireNonNull(before3); return (value1, value2, value3) -> applyAsByteThrows( before1.applyThrows(value1), before2.testThrows(value2), before3.testThrows(value3)); }
/** * Returns a composed {@link ThrowableTriLongToFloatFunction} that first applies the {@code * before} functions to its input, and then applies this function to the result. This method is * just convenience, to provide the ability to execute an operation which accepts {@code long} * input, before this primitive function is executed. * * @param before1 The first function to apply before this function is applied * @param before2 The second operator to apply before this function is applied * @param before3 The third operator to apply before this function is applied * @return A composed {@code ThrowableTriLongToFloatFunction} that first applies the {@code * before} functions to its input, and then applies this function to the result. * @throws NullPointerException If given argument is {@code null} * @implSpec The input argument of this method is a able to handle primitive values. In this case * this is {@code long}. */ @Nonnull default ThrowableTriLongToFloatFunction<X> composeFromLong( @Nonnull final ThrowableLongFunction<? extends T, ? extends X> before1, @Nonnull final ThrowableLongUnaryOperator<? extends X> before2, @Nonnull final ThrowableLongUnaryOperator<? extends X> before3) { Objects.requireNonNull(before1); Objects.requireNonNull(before2); Objects.requireNonNull(before3); return (value1, value2, value3) -> applyAsFloatThrows( before1.applyThrows(value1), before2.applyAsLongThrows(value2), before3.applyAsLongThrows(value3)); }