List of usage examples for java.util.function DoubleFunction apply
R apply(double value);
From source file:at.gridtec.lambda4j.function.tri.conversion.TriBooleanToDoubleFunction.java
/** * Returns a composed {@link TriBooleanFunction} 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. * * @param <S> The type of return value from the {@code after} function, and of the composed function * @param after The function to apply after this function is applied * @return A composed {@code TriBooleanFunction} 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 able to return every type. *///from w ww .j a v a 2 s .c om @Nonnull default <S> TriBooleanFunction<S> andThen(@Nonnull final DoubleFunction<? extends S> after) { Objects.requireNonNull(after); return (value1, value2, value3) -> after.apply(applyAsDouble(value1, value2, value3)); }
From source file:at.gridtec.lambda4j.function.tri.conversion.TriByteToDoubleFunction.java
/** * Returns a composed {@link TriByteFunction} 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. * * @param <S> The type of return value from the {@code after} function, and of the composed function * @param after The function to apply after this function is applied * @return A composed {@code TriByteFunction} 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 able to return every type. *///from www . j a v a 2 s. c o m @Nonnull default <S> TriByteFunction<S> andThen(@Nonnull final DoubleFunction<? extends S> after) { Objects.requireNonNull(after); return (value1, value2, value3) -> after.apply(applyAsDouble(value1, value2, value3)); }
From source file:at.gridtec.lambda4j.function.tri.conversion.TriCharToDoubleFunction.java
/** * Returns a composed {@link TriCharFunction} 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. * * @param <S> The type of return value from the {@code after} function, and of the composed function * @param after The function to apply after this function is applied * @return A composed {@code TriCharFunction} 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 able to return every type. *//* w ww .ja v a 2s. c o m*/ @Nonnull default <S> TriCharFunction<S> andThen(@Nonnull final DoubleFunction<? extends S> after) { Objects.requireNonNull(after); return (value1, value2, value3) -> after.apply(applyAsDouble(value1, value2, value3)); }
From source file:at.gridtec.lambda4j.function.tri.conversion.TriFloatToDoubleFunction.java
/** * Returns a composed {@link TriFloatFunction} 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. * * @param <S> The type of return value from the {@code after} function, and of the composed function * @param after The function to apply after this function is applied * @return A composed {@code TriFloatFunction} 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 able to return every type. *//* ww w . j a v a 2 s . c o m*/ @Nonnull default <S> TriFloatFunction<S> andThen(@Nonnull final DoubleFunction<? extends S> after) { Objects.requireNonNull(after); return (value1, value2, value3) -> after.apply(applyAsDouble(value1, value2, value3)); }
From source file:at.gridtec.lambda4j.function.tri.conversion.TriIntToDoubleFunction.java
/** * Returns a composed {@link TriIntFunction} 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. * * @param <S> The type of return value from the {@code after} function, and of the composed function * @param after The function to apply after this function is applied * @return A composed {@code TriIntFunction} 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 able to return every type. *///ww w .j av a 2s. c om @Nonnull default <S> TriIntFunction<S> andThen(@Nonnull final DoubleFunction<? extends S> after) { Objects.requireNonNull(after); return (value1, value2, value3) -> after.apply(applyAsDouble(value1, value2, value3)); }
From source file:at.gridtec.lambda4j.function.tri.conversion.TriLongToDoubleFunction.java
/** * Returns a composed {@link TriLongFunction} 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. * * @param <S> The type of return value from the {@code after} function, and of the composed function * @param after The function to apply after this function is applied * @return A composed {@code TriLongFunction} 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 able to return every type. */// ww w . ja v a 2s . co m @Nonnull default <S> TriLongFunction<S> andThen(@Nonnull final DoubleFunction<? extends S> after) { Objects.requireNonNull(after); return (value1, value2, value3) -> after.apply(applyAsDouble(value1, value2, value3)); }
From source file:at.gridtec.lambda4j.function.tri.conversion.TriShortToDoubleFunction.java
/** * Returns a composed {@link TriShortFunction} 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. * * @param <S> The type of return value from the {@code after} function, and of the composed function * @param after The function to apply after this function is applied * @return A composed {@code TriShortFunction} 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 able to return every type. *///from w w w . j a v a 2 s . co m @Nonnull default <S> TriShortFunction<S> andThen(@Nonnull final DoubleFunction<? extends S> after) { Objects.requireNonNull(after); return (value1, value2, value3) -> after.apply(applyAsDouble(value1, value2, value3)); }
From source file:at.gridtec.lambda4j.operator.ternary.DoubleTernaryOperator.java
/** * Returns a composed {@link TriDoubleFunction} 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. * * @param <S> The type of return value from the {@code after} function, and of the composed function * @param after The function to apply after this operator is applied * @return A composed {@code TriDoubleFunction} 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 able to return every type. *//*from w w w . ja v a2 s. c o m*/ @Nonnull default <S> TriDoubleFunction<S> andThen(@Nonnull final DoubleFunction<? extends S> after) { Objects.requireNonNull(after); return (value1, value2, value3) -> after.apply(applyAsDouble(value1, value2, value3)); }
From source file:at.gridtec.lambda4j.function.tri.obj.ObjBiBooleanToDoubleFunction.java
/** * Returns a composed {@link ObjBiBooleanFunction} 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. * * @param <S> The type of return value from the {@code after} function, and of the composed function * @param after The function to apply after this function is applied * @return A composed {@code ObjBiBooleanFunction} 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 able to return every type. *//*from w w w . ja v a 2s . com*/ @Nonnull default <S> ObjBiBooleanFunction<T, S> andThen(@Nonnull final DoubleFunction<? extends S> after) { Objects.requireNonNull(after); return (t, value1, value2) -> after.apply(applyAsDouble(t, value1, value2)); }
From source file:at.gridtec.lambda4j.function.tri.obj.ObjBiByteToDoubleFunction.java
/** * Returns a composed {@link ObjBiByteFunction} 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. * * @param <S> The type of return value from the {@code after} function, and of the composed function * @param after The function to apply after this function is applied * @return A composed {@code ObjBiByteFunction} 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 able to return every type. *///w w w .ja v a 2s . co m @Nonnull default <S> ObjBiByteFunction<T, S> andThen(@Nonnull final DoubleFunction<? extends S> after) { Objects.requireNonNull(after); return (t, value1, value2) -> after.apply(applyAsDouble(t, value1, value2)); }