List of usage examples for java.util.function IntUnaryOperator applyAsInt
int applyAsInt(int operand);
From source file:at.gridtec.lambda4j.function.bi.conversion.BiShortToIntFunction.java
/** * Returns a composed {@link BiShortToIntFunction} 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 BiShortToIntFunction} 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 a v a 2 s .c o m*/ */ @Nonnull default BiShortToIntFunction andThenToInt(@Nonnull final IntUnaryOperator after) { Objects.requireNonNull(after); return (value1, value2) -> after.applyAsInt(applyAsInt(value1, value2)); }
From source file:at.gridtec.lambda4j.function.bi.conversion.BiLongToIntFunction.java
/** * Returns a composed {@link BiLongToIntFunction} 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 BiLongToIntFunction} 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 .jav a2s. c om */ @Nonnull default BiLongToIntFunction andThenToInt(@Nonnull final IntUnaryOperator after) { Objects.requireNonNull(after); return (value1, value2) -> after.applyAsInt(applyAsInt(value1, value2)); }
From source file:at.gridtec.lambda4j.function.bi.conversion.BiDoubleToIntFunction.java
/** * Returns a composed {@link BiDoubleToIntFunction} 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 BiDoubleToIntFunction} 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 a va 2 s . c o m*/ */ @Nonnull default BiDoubleToIntFunction andThenToInt(@Nonnull final IntUnaryOperator after) { Objects.requireNonNull(after); return (value1, value2) -> after.applyAsInt(applyAsInt(value1, value2)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjIntToIntFunction.java
/** * Returns a composed {@link ObjIntToIntFunction} 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 ObjIntToIntFunction} 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 . java2 s.co m*/ */ @Nonnull default ObjIntToIntFunction<T> andThenToInt(@Nonnull final IntUnaryOperator after) { Objects.requireNonNull(after); return (t, value) -> after.applyAsInt(applyAsInt(t, value)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjByteToIntFunction.java
/** * Returns a composed {@link ObjByteToIntFunction} 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 ObjByteToIntFunction} 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 2 s. c om */ @Nonnull default ObjByteToIntFunction<T> andThenToInt(@Nonnull final IntUnaryOperator after) { Objects.requireNonNull(after); return (t, value) -> after.applyAsInt(applyAsInt(t, value)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjCharToIntFunction.java
/** * Returns a composed {@link ObjCharToIntFunction} 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 ObjCharToIntFunction} 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 av a 2s . c o m*/ */ @Nonnull default ObjCharToIntFunction<T> andThenToInt(@Nonnull final IntUnaryOperator after) { Objects.requireNonNull(after); return (t, value) -> after.applyAsInt(applyAsInt(t, value)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjFloatToIntFunction.java
/** * Returns a composed {@link ObjFloatToIntFunction} 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 ObjFloatToIntFunction} 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 a v a 2s .c om*/ */ @Nonnull default ObjFloatToIntFunction<T> andThenToInt(@Nonnull final IntUnaryOperator after) { Objects.requireNonNull(after); return (t, value) -> after.applyAsInt(applyAsInt(t, value)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjShortToIntFunction.java
/** * Returns a composed {@link ObjShortToIntFunction} 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 ObjShortToIntFunction} 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}.//www . j a v a 2s . c o m */ @Nonnull default ObjShortToIntFunction<T> andThenToInt(@Nonnull final IntUnaryOperator after) { Objects.requireNonNull(after); return (t, value) -> after.applyAsInt(applyAsInt(t, value)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjBooleanToIntFunction.java
/** * Returns a composed {@link ObjBooleanToIntFunction} 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 ObjBooleanToIntFunction} 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 a va2 s. c o m */ @Nonnull default ObjBooleanToIntFunction<T> andThenToInt(@Nonnull final IntUnaryOperator after) { Objects.requireNonNull(after); return (t, value) -> after.applyAsInt(applyAsInt(t, value)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjLongToIntFunction.java
/** * Returns a composed {@link ObjLongToIntFunction} 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 ObjLongToIntFunction} 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 av a 2 s . c om */ @Nonnull default ObjLongToIntFunction<T> andThenToInt(@Nonnull final IntUnaryOperator after) { Objects.requireNonNull(after); return (t, value) -> after.applyAsInt(applyAsInt(t, value)); }