List of usage examples for java.util.function IntToDoubleFunction applyAsDouble
double applyAsDouble(int value);
From source file:at.gridtec.lambda4j.function.bi.conversion.BiDoubleToIntFunction.java
/** * Returns a composed {@link DoubleBinaryOperator2} that first applies this function to its input, and then applies * the {@code after} 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 transform this * primitive function to an operation returning {@code double}. * * @param after The function to apply after this function is applied * @return A composed {@code DoubleBinaryOperator2} that first applies this function to its input, and then applies * the {@code after} function 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 * double}./* w ww . j a va2 s . c om*/ */ @Nonnull default DoubleBinaryOperator2 andThenToDouble(@Nonnull final IntToDoubleFunction after) { Objects.requireNonNull(after); return (value1, value2) -> after.applyAsDouble(applyAsInt(value1, value2)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjIntToIntFunction.java
/** * Returns a composed {@link ObjIntToDoubleFunction} that first applies this function to its input, and then applies * the {@code after} 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 transform this * primitive function to an operation returning {@code double}. * * @param after The function to apply after this function is applied * @return A composed {@code ObjIntToDoubleFunction} that first applies this function to its input, and then applies * the {@code after} function 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 * double}./* ww w. ja v a2 s.c om*/ */ @Nonnull default ObjIntToDoubleFunction<T> andThenToDouble(@Nonnull final IntToDoubleFunction after) { Objects.requireNonNull(after); return (t, value) -> after.applyAsDouble(applyAsInt(t, value)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjByteToIntFunction.java
/** * Returns a composed {@link ObjByteToDoubleFunction} that first applies this function to its input, and then * applies the {@code after} 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 * transform this primitive function to an operation returning {@code double}. * * @param after The function to apply after this function is applied * @return A composed {@code ObjByteToDoubleFunction} that first applies this function to its input, and then * applies the {@code after} function 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 * double}./*from w w w . ja v a 2s . c o m*/ */ @Nonnull default ObjByteToDoubleFunction<T> andThenToDouble(@Nonnull final IntToDoubleFunction after) { Objects.requireNonNull(after); return (t, value) -> after.applyAsDouble(applyAsInt(t, value)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjCharToIntFunction.java
/** * Returns a composed {@link ObjCharToDoubleFunction} that first applies this function to its input, and then * applies the {@code after} 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 * transform this primitive function to an operation returning {@code double}. * * @param after The function to apply after this function is applied * @return A composed {@code ObjCharToDoubleFunction} that first applies this function to its input, and then * applies the {@code after} function 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 * double}./* ww w . ja va 2 s .co m*/ */ @Nonnull default ObjCharToDoubleFunction<T> andThenToDouble(@Nonnull final IntToDoubleFunction after) { Objects.requireNonNull(after); return (t, value) -> after.applyAsDouble(applyAsInt(t, value)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjFloatToIntFunction.java
/** * Returns a composed {@link ObjFloatToDoubleFunction} that first applies this function to its input, and then * applies the {@code after} 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 * transform this primitive function to an operation returning {@code double}. * * @param after The function to apply after this function is applied * @return A composed {@code ObjFloatToDoubleFunction} that first applies this function to its input, and then * applies the {@code after} function 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 * double}.//from w w w . j a v a 2 s .co m */ @Nonnull default ObjFloatToDoubleFunction<T> andThenToDouble(@Nonnull final IntToDoubleFunction after) { Objects.requireNonNull(after); return (t, value) -> after.applyAsDouble(applyAsInt(t, value)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjShortToIntFunction.java
/** * Returns a composed {@link ObjShortToDoubleFunction} that first applies this function to its input, and then * applies the {@code after} 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 * transform this primitive function to an operation returning {@code double}. * * @param after The function to apply after this function is applied * @return A composed {@code ObjShortToDoubleFunction} that first applies this function to its input, and then * applies the {@code after} function 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 * double}./*from ww w . ja v a 2 s . c o m*/ */ @Nonnull default ObjShortToDoubleFunction<T> andThenToDouble(@Nonnull final IntToDoubleFunction after) { Objects.requireNonNull(after); return (t, value) -> after.applyAsDouble(applyAsInt(t, value)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjBooleanToIntFunction.java
/** * Returns a composed {@link ObjBooleanToDoubleFunction} that first applies this function to its input, and then * applies the {@code after} 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 * transform this primitive function to an operation returning {@code double}. * * @param after The function to apply after this function is applied * @return A composed {@code ObjBooleanToDoubleFunction} that first applies this function to its input, and then * applies the {@code after} function 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 * double}.//w w w . j a v a 2 s.c o m */ @Nonnull default ObjBooleanToDoubleFunction<T> andThenToDouble(@Nonnull final IntToDoubleFunction after) { Objects.requireNonNull(after); return (t, value) -> after.applyAsDouble(applyAsInt(t, value)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjLongToIntFunction.java
/** * Returns a composed {@link ObjLongToDoubleFunction} that first applies this function to its input, and then * applies the {@code after} 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 * transform this primitive function to an operation returning {@code double}. * * @param after The function to apply after this function is applied * @return A composed {@code ObjLongToDoubleFunction} that first applies this function to its input, and then * applies the {@code after} function 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 * double}.//from w w w . j a v a 2 s .c o m */ @Nonnull default ObjLongToDoubleFunction<T> andThenToDouble(@Nonnull final IntToDoubleFunction after) { Objects.requireNonNull(after); return (t, value) -> after.applyAsDouble(applyAsInt(t, value)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjDoubleToIntFunction.java
/** * Returns a composed {@link ObjDoubleToDoubleFunction} that first applies this function to its input, and then * applies the {@code after} 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 * transform this primitive function to an operation returning {@code double}. * * @param after The function to apply after this function is applied * @return A composed {@code ObjDoubleToDoubleFunction} that first applies this function to its input, and then * applies the {@code after} function 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 * double}./* ww w. ja v a 2s. c o m*/ */ @Nonnull default ObjDoubleToDoubleFunction<T> andThenToDouble(@Nonnull final IntToDoubleFunction after) { Objects.requireNonNull(after); return (t, value) -> after.applyAsDouble(applyAsInt(t, value)); }
From source file:at.gridtec.lambda4j.operator.binary.IntBinaryOperator2.java
/** * Returns a composed {@link BiIntToDoubleFunction} that first applies this operator to its input, and then applies * the {@code after} 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 transform this * primitive operator to an operation returning {@code double}. * * @param after The function to apply after this operator is applied * @return A composed {@code BiIntToDoubleFunction} that first applies this operator to its input, and then applies * the {@code after} function 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 * double}./* w ww. j av a 2 s. c o m*/ */ @Nonnull default BiIntToDoubleFunction andThenToDouble(@Nonnull final IntToDoubleFunction after) { Objects.requireNonNull(after); return (value1, value2) -> after.applyAsDouble(applyAsInt(value1, value2)); }