List of usage examples for java.util.function LongToDoubleFunction applyAsDouble
double applyAsDouble(long value);
From source file:at.gridtec.lambda4j.function.bi.conversion.BiDoubleToLongFunction.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}./*from w w w . j ava 2s. c om*/ */ @Nonnull default DoubleBinaryOperator2 andThenToDouble(@Nonnull final LongToDoubleFunction after) { Objects.requireNonNull(after); return (value1, value2) -> after.applyAsDouble(applyAsLong(value1, value2)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjLongToLongFunction.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 ww . ja v a2s. co m */ @Nonnull default ObjLongToDoubleFunction<T> andThenToDouble(@Nonnull final LongToDoubleFunction after) { Objects.requireNonNull(after); return (t, value) -> after.applyAsDouble(applyAsLong(t, value)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjByteToLongFunction.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 va2 s . c om */ @Nonnull default ObjByteToDoubleFunction<T> andThenToDouble(@Nonnull final LongToDoubleFunction after) { Objects.requireNonNull(after); return (t, value) -> after.applyAsDouble(applyAsLong(t, value)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjCharToLongFunction.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}.//from w w w. j a v a2 s. c om */ @Nonnull default ObjCharToDoubleFunction<T> andThenToDouble(@Nonnull final LongToDoubleFunction after) { Objects.requireNonNull(after); return (t, value) -> after.applyAsDouble(applyAsLong(t, value)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjFloatToLongFunction.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 a2 s . c o m*/ */ @Nonnull default ObjFloatToDoubleFunction<T> andThenToDouble(@Nonnull final LongToDoubleFunction after) { Objects.requireNonNull(after); return (t, value) -> after.applyAsDouble(applyAsLong(t, value)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjShortToLongFunction.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}./* w w w. ja v a2 s . c om*/ */ @Nonnull default ObjShortToDoubleFunction<T> andThenToDouble(@Nonnull final LongToDoubleFunction after) { Objects.requireNonNull(after); return (t, value) -> after.applyAsDouble(applyAsLong(t, value)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjBooleanToLongFunction.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}./*from w w w . ja v a 2 s . c o m*/ */ @Nonnull default ObjBooleanToDoubleFunction<T> andThenToDouble(@Nonnull final LongToDoubleFunction after) { Objects.requireNonNull(after); return (t, value) -> after.applyAsDouble(applyAsLong(t, value)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjIntToLongFunction.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}.//from w ww . j a v a 2 s . c om */ @Nonnull default ObjIntToDoubleFunction<T> andThenToDouble(@Nonnull final LongToDoubleFunction after) { Objects.requireNonNull(after); return (t, value) -> after.applyAsDouble(applyAsLong(t, value)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjDoubleToLongFunction.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}.//from ww w .j a va 2 s .co m */ @Nonnull default ObjDoubleToDoubleFunction<T> andThenToDouble(@Nonnull final LongToDoubleFunction after) { Objects.requireNonNull(after); return (t, value) -> after.applyAsDouble(applyAsLong(t, value)); }
From source file:at.gridtec.lambda4j.operator.binary.LongBinaryOperator2.java
/** * Returns a composed {@link BiLongToDoubleFunction} 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 BiLongToDoubleFunction} 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 . jav a 2 s .c o m */ @Nonnull default BiLongToDoubleFunction andThenToDouble(@Nonnull final LongToDoubleFunction after) { Objects.requireNonNull(after); return (value1, value2) -> after.applyAsDouble(applyAsLong(value1, value2)); }