List of usage examples for java.util.function IntUnaryOperator applyAsInt
int applyAsInt(int operand);
From source file:at.gridtec.lambda4j.function.bi.obj.ObjDoubleToIntFunction.java
/** * Returns a composed {@link ObjDoubleToIntFunction} that first applies this function to its input, and then applies * the {@code after} operator to the result. If evaluation of either operation throws an exception, it is relayed to * the caller of the composed operation. This method is just convenience, to provide the ability to transform this * primitive function to an operation returning {@code int}. * * @param after The operator to apply after this function is applied * @return A composed {@code ObjDoubleToIntFunction} that first applies this function to its input, and then applies * the {@code after} operator 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 * int}.//from w w w . j a v a 2s .c om */ @Nonnull default ObjDoubleToIntFunction<T> andThenToInt(@Nonnull final IntUnaryOperator after) { Objects.requireNonNull(after); return (t, value) -> after.applyAsInt(applyAsInt(t, value)); }
From source file:at.gridtec.lambda4j.operator.binary.IntBinaryOperator2.java
/** * Returns a composed {@link IntBinaryOperator2} that first applies this operator to its input, and then applies the * {@code after} operator to the result. If evaluation of either operation throws an exception, it is relayed to the * caller of the composed operation. This method is just convenience, to provide the ability to transform this * primitive operator to an operation returning {@code int}. * * @param after The operator to apply after this operator is applied * @return A composed {@code IntBinaryOperator2} that first applies this operator to its input, and then applies the * {@code after} operator 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 * int}./*from w w w . j a va 2 s.c o m*/ */ @Nonnull default IntBinaryOperator2 andThenToInt(@Nonnull final IntUnaryOperator after) { Objects.requireNonNull(after); return (value1, value2) -> after.applyAsInt(applyAsInt(value1, value2)); }
From source file:at.gridtec.lambda4j.function.tri.conversion.TriByteToIntFunction.java
/** * Returns a composed {@link TriByteToIntFunction} that first applies this function to its input, and then applies * the {@code after} operator to the result. If evaluation of either operation throws an exception, it is relayed to * the caller of the composed operation. This method is just convenience, to provide the ability to transform this * primitive function to an operation returning {@code int}. * * @param after The operator to apply after this function is applied * @return A composed {@code TriByteToIntFunction} that first applies this function to its input, and then applies * the {@code after} operator 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 * int}./*from ww w .j av a 2 s. co m*/ */ @Nonnull default TriByteToIntFunction andThenToInt(@Nonnull final IntUnaryOperator after) { Objects.requireNonNull(after); return (value1, value2, value3) -> after.applyAsInt(applyAsInt(value1, value2, value3)); }
From source file:at.gridtec.lambda4j.function.tri.conversion.TriCharToIntFunction.java
/** * Returns a composed {@link TriCharToIntFunction} that first applies this function to its input, and then applies * the {@code after} operator to the result. If evaluation of either operation throws an exception, it is relayed to * the caller of the composed operation. This method is just convenience, to provide the ability to transform this * primitive function to an operation returning {@code int}. * * @param after The operator to apply after this function is applied * @return A composed {@code TriCharToIntFunction} that first applies this function to its input, and then applies * the {@code after} operator 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 * int}./*from ww w . ja va 2s . c o m*/ */ @Nonnull default TriCharToIntFunction andThenToInt(@Nonnull final IntUnaryOperator after) { Objects.requireNonNull(after); return (value1, value2, value3) -> after.applyAsInt(applyAsInt(value1, value2, value3)); }
From source file:at.gridtec.lambda4j.function.tri.conversion.TriFloatToIntFunction.java
/** * Returns a composed {@link TriFloatToIntFunction} that first applies this function to its input, and then applies * the {@code after} operator to the result. If evaluation of either operation throws an exception, it is relayed to * the caller of the composed operation. This method is just convenience, to provide the ability to transform this * primitive function to an operation returning {@code int}. * * @param after The operator to apply after this function is applied * @return A composed {@code TriFloatToIntFunction} that first applies this function to its input, and then applies * the {@code after} operator 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 * int}./*from w ww .jav a 2s .c o m*/ */ @Nonnull default TriFloatToIntFunction andThenToInt(@Nonnull final IntUnaryOperator after) { Objects.requireNonNull(after); return (value1, value2, value3) -> after.applyAsInt(applyAsInt(value1, value2, value3)); }
From source file:at.gridtec.lambda4j.function.tri.conversion.TriLongToIntFunction.java
/** * Returns a composed {@link TriLongToIntFunction} that first applies this function to its input, and then applies * the {@code after} operator to the result. If evaluation of either operation throws an exception, it is relayed to * the caller of the composed operation. This method is just convenience, to provide the ability to transform this * primitive function to an operation returning {@code int}. * * @param after The operator to apply after this function is applied * @return A composed {@code TriLongToIntFunction} that first applies this function to its input, and then applies * the {@code after} operator 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 * int}./*w w w .ja v a 2 s . c om*/ */ @Nonnull default TriLongToIntFunction andThenToInt(@Nonnull final IntUnaryOperator after) { Objects.requireNonNull(after); return (value1, value2, value3) -> after.applyAsInt(applyAsInt(value1, value2, value3)); }
From source file:at.gridtec.lambda4j.function.tri.conversion.TriShortToIntFunction.java
/** * Returns a composed {@link TriShortToIntFunction} that first applies this function to its input, and then applies * the {@code after} operator to the result. If evaluation of either operation throws an exception, it is relayed to * the caller of the composed operation. This method is just convenience, to provide the ability to transform this * primitive function to an operation returning {@code int}. * * @param after The operator to apply after this function is applied * @return A composed {@code TriShortToIntFunction} that first applies this function to its input, and then applies * the {@code after} operator 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 * int}./* w ww .j a v a 2s .c om*/ */ @Nonnull default TriShortToIntFunction andThenToInt(@Nonnull final IntUnaryOperator after) { Objects.requireNonNull(after); return (value1, value2, value3) -> after.applyAsInt(applyAsInt(value1, value2, value3)); }
From source file:at.gridtec.lambda4j.function.tri.conversion.TriBooleanToIntFunction.java
/** * Returns a composed {@link TriBooleanToIntFunction} that first applies this function to its input, and then * applies the {@code after} operator to the result. If evaluation of either operation throws an exception, it is * relayed to the caller of the composed operation. This method is just convenience, to provide the ability to * transform this primitive function to an operation returning {@code int}. * * @param after The operator to apply after this function is applied * @return A composed {@code TriBooleanToIntFunction} that first applies this function to its input, and then * applies the {@code after} operator 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 * int}./*from www . j av a 2 s .c om*/ */ @Nonnull default TriBooleanToIntFunction andThenToInt(@Nonnull final IntUnaryOperator after) { Objects.requireNonNull(after); return (value1, value2, value3) -> after.applyAsInt(applyAsInt(value1, value2, value3)); }
From source file:at.gridtec.lambda4j.function.tri.conversion.TriDoubleToIntFunction.java
/** * Returns a composed {@link TriDoubleToIntFunction} that first applies this function to its input, and then applies * the {@code after} operator to the result. If evaluation of either operation throws an exception, it is relayed to * the caller of the composed operation. This method is just convenience, to provide the ability to transform this * primitive function to an operation returning {@code int}. * * @param after The operator to apply after this function is applied * @return A composed {@code TriDoubleToIntFunction} that first applies this function to its input, and then applies * the {@code after} operator 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 * int}./*w ww . j a v a 2 s . co m*/ */ @Nonnull default TriDoubleToIntFunction andThenToInt(@Nonnull final IntUnaryOperator after) { Objects.requireNonNull(after); return (value1, value2, value3) -> after.applyAsInt(applyAsInt(value1, value2, value3)); }
From source file:at.gridtec.lambda4j.operator.ternary.IntTernaryOperator.java
/** * Returns a composed {@link IntTernaryOperator} that first applies this operator to its input, and then applies the * {@code after} operator to the result. If evaluation of either operation throws an exception, it is relayed to the * caller of the composed operation. This method is just convenience, to provide the ability to transform this * primitive operator to an operation returning {@code int}. * * @param after The operator to apply after this operator is applied * @return A composed {@code IntTernaryOperator} that first applies this operator to its input, and then applies the * {@code after} operator 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 * int}.//from w w w .jav a 2 s. c o m */ @Nonnull default IntTernaryOperator andThenToInt(@Nonnull final IntUnaryOperator after) { Objects.requireNonNull(after); return (value1, value2, value3) -> after.applyAsInt(applyAsInt(value1, value2, value3)); }