List of usage examples for java.util.function IntToLongFunction applyAsLong
long applyAsLong(int value);
From source file:at.gridtec.lambda4j.function.bi.obj.ObjLongToByteFunction.java
/** * Returns a composed {@link BiIntToByteFunction} that first applies the {@code before} functions to * its input, and then applies this function 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 execute an operation which accepts {@code int} 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 BiIntToByteFunction} 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 * int}.// w ww . ja va 2s. c om */ @Nonnull default BiIntToByteFunction composeFromInt(@Nonnull final IntFunction<? extends T> before1, @Nonnull final IntToLongFunction before2) { Objects.requireNonNull(before1); Objects.requireNonNull(before2); return (value1, value2) -> applyAsByte(before1.apply(value1), before2.applyAsLong(value2)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjLongToCharFunction.java
/** * Returns a composed {@link BiIntToCharFunction} that first applies the {@code before} functions to * its input, and then applies this function 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 execute an operation which accepts {@code int} 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 BiIntToCharFunction} 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 * int}./*from w ww.ja v a 2 s. c o m*/ */ @Nonnull default BiIntToCharFunction composeFromInt(@Nonnull final IntFunction<? extends T> before1, @Nonnull final IntToLongFunction before2) { Objects.requireNonNull(before1); Objects.requireNonNull(before2); return (value1, value2) -> applyAsChar(before1.apply(value1), before2.applyAsLong(value2)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjLongToLongFunction.java
/** * Returns a composed {@link BiIntToLongFunction} that first applies the {@code before} functions to * its input, and then applies this function 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 execute an operation which accepts {@code int} 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 BiIntToLongFunction} 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 * int}./* w w w . j a v a 2 s .co m*/ */ @Nonnull default BiIntToLongFunction composeFromInt(@Nonnull final IntFunction<? extends T> before1, @Nonnull final IntToLongFunction before2) { Objects.requireNonNull(before1); Objects.requireNonNull(before2); return (value1, value2) -> applyAsLong(before1.apply(value1), before2.applyAsLong(value2)); }
From source file:at.gridtec.lambda4j.function.bi.conversion.BiLongToFloatFunction.java
/** * Returns a composed {@link BiIntToFloatFunction} that first applies the {@code before} functions to * its input, and then applies this function 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 execute an operation which accepts {@code int} 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 BiIntToFloatFunction} 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 * int}./*from w w w . j a v a2s .co m*/ */ @Nonnull default BiIntToFloatFunction composeFromInt(@Nonnull final IntToLongFunction before1, @Nonnull final IntToLongFunction before2) { Objects.requireNonNull(before1); Objects.requireNonNull(before2); return (value1, value2) -> applyAsFloat(before1.applyAsLong(value1), before2.applyAsLong(value2)); }
From source file:at.gridtec.lambda4j.function.bi.conversion.BiLongToShortFunction.java
/** * Returns a composed {@link BiIntToShortFunction} that first applies the {@code before} functions to * its input, and then applies this function 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 execute an operation which accepts {@code int} 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 BiIntToShortFunction} 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 * int}.//from ww w . j a va 2 s . c o m */ @Nonnull default BiIntToShortFunction composeFromInt(@Nonnull final IntToLongFunction before1, @Nonnull final IntToLongFunction before2) { Objects.requireNonNull(before1); Objects.requireNonNull(before2); return (value1, value2) -> applyAsShort(before1.applyAsLong(value1), before2.applyAsLong(value2)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjLongToFloatFunction.java
/** * Returns a composed {@link BiIntToFloatFunction} that first applies the {@code before} functions to * its input, and then applies this function 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 execute an operation which accepts {@code int} 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 BiIntToFloatFunction} 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 * int}.//from w ww . j ava2 s .co m */ @Nonnull default BiIntToFloatFunction composeFromInt(@Nonnull final IntFunction<? extends T> before1, @Nonnull final IntToLongFunction before2) { Objects.requireNonNull(before1); Objects.requireNonNull(before2); return (value1, value2) -> applyAsFloat(before1.apply(value1), before2.applyAsLong(value2)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjLongToIntFunction.java
/** * Returns a composed {@link IntBinaryOperator2} that first applies the {@code before} functions to * its input, and then applies this function 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 execute an operation which accepts {@code int} 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 IntBinaryOperator2} 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 * int}.//ww w .ja va 2s.co m */ @Nonnull default IntBinaryOperator2 composeFromInt(@Nonnull final IntFunction<? extends T> before1, @Nonnull final IntToLongFunction before2) { Objects.requireNonNull(before1); Objects.requireNonNull(before2); return (value1, value2) -> applyAsInt(before1.apply(value1), before2.applyAsLong(value2)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjLongToShortFunction.java
/** * Returns a composed {@link BiIntToShortFunction} that first applies the {@code before} functions to * its input, and then applies this function 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 execute an operation which accepts {@code int} 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 BiIntToShortFunction} 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 * int}./*from w w w. java2s. c om*/ */ @Nonnull default BiIntToShortFunction composeFromInt(@Nonnull final IntFunction<? extends T> before1, @Nonnull final IntToLongFunction before2) { Objects.requireNonNull(before1); Objects.requireNonNull(before2); return (value1, value2) -> applyAsShort(before1.apply(value1), before2.applyAsLong(value2)); }
From source file:at.gridtec.lambda4j.function.bi.conversion.BiLongToDoubleFunction.java
/** * Returns a composed {@link BiIntToDoubleFunction} that first applies the {@code before} functions to * its input, and then applies this function 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 execute an operation which accepts {@code int} 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 BiIntToDoubleFunction} 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 * int}./*w w w . j a v a2 s. com*/ */ @Nonnull default BiIntToDoubleFunction composeFromInt(@Nonnull final IntToLongFunction before1, @Nonnull final IntToLongFunction before2) { Objects.requireNonNull(before1); Objects.requireNonNull(before2); return (value1, value2) -> applyAsDouble(before1.applyAsLong(value1), before2.applyAsLong(value2)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjLongToDoubleFunction.java
/** * Returns a composed {@link BiIntToDoubleFunction} that first applies the {@code before} functions to * its input, and then applies this function 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 execute an operation which accepts {@code int} 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 BiIntToDoubleFunction} 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 * int}.// w ww . j a v a 2 s . c o m */ @Nonnull default BiIntToDoubleFunction composeFromInt(@Nonnull final IntFunction<? extends T> before1, @Nonnull final IntToLongFunction before2) { Objects.requireNonNull(before1); Objects.requireNonNull(before2); return (value1, value2) -> applyAsDouble(before1.apply(value1), before2.applyAsLong(value2)); }