/** * Returns a composed {@link ThrowableByteBinaryOperator} that first applies the {@code before} * predicates 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 byte} input, * before this primitive function is executed. * * @param before1 The first predicate to apply before this function is applied * @param before2 The second predicate to apply before this function is applied * @return A composed {@code ThrowableByteBinaryOperator} that first applies the {@code before} * predicates 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 byte}. */ @Nonnull default ThrowableByteBinaryOperator<X> composeFromByte( @Nonnull final ThrowableBytePredicate<? extends X> before1, @Nonnull final ThrowableBytePredicate<? extends X> before2) { Objects.requireNonNull(before1); Objects.requireNonNull(before2); return (value1, value2) -> applyAsByteThrows(before1.testThrows(value1), before2.testThrows(value2)); }
/** * Returns a composed {@link ThrowableByteTernaryOperator} 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 byte} 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 ThrowableByteTernaryOperator} 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 byte}. */ @Nonnull default ThrowableByteTernaryOperator<X> composeFromByte( @Nonnull final ThrowableByteFunction<? extends T, ? extends X> before1, @Nonnull final ThrowableBytePredicate<? extends X> before2, @Nonnull final ThrowableBytePredicate<? 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 ThrowableBooleanBinaryOperator} that first applies this function to * its input, and then applies the {@code after} predicate to the result. This method is just * convenience, to provide the ability to transform this primitive function to an operation * returning {@code boolean}. * * @param after The predicate to apply after this function is applied * @return A composed {@code ThrowableBooleanBinaryOperator} that first applies this function to * its input, and then applies the {@code after} predicate to the result. * @throws NullPointerException If given argument is {@code null} * @implSpec The input argument of this method is a able to return primitive values. In this case * this is {@code boolean}. */ @Nonnull default ThrowableBooleanBinaryOperator<X> andThenToBoolean( @Nonnull final ThrowableBytePredicate<? extends X> after) { Objects.requireNonNull(after); return (value1, value2) -> after.testThrows(applyAsByteThrows(value1, value2)); }
/** * Returns a composed {@link ThrowableObjBiBooleanPredicate} that first applies this function to * its input, and then applies the {@code after} predicate to the result. This method is just * convenience, to provide the ability to transform this primitive function to an operation * returning {@code boolean}. * * @param after The predicate to apply after this function is applied * @return A composed {@code ThrowableObjBiBooleanPredicate} that first applies this function to * its input, and then applies the {@code after} predicate to the result. * @throws NullPointerException If given argument is {@code null} * @implSpec The input argument of this method is a able to return primitive values. In this case * this is {@code boolean}. */ @Nonnull default ThrowableObjBiBooleanPredicate<T, X> andThenToBoolean( @Nonnull final ThrowableBytePredicate<? extends X> after) { Objects.requireNonNull(after); return (t, value1, value2) -> after.testThrows(applyAsByteThrows(t, value1, value2)); }