Example usage for java.util.function DoubleUnaryOperator applyAsDouble

List of usage examples for java.util.function DoubleUnaryOperator applyAsDouble

Introduction

In this page you can find the example usage for java.util.function DoubleUnaryOperator applyAsDouble.

Prototype

double applyAsDouble(double operand);

Source Link

Document

Applies this operator to the given operand.

Usage

From source file:at.gridtec.lambda4j.function.bi.conversion.BiShortToDoubleFunction.java

/**
 * Returns a composed {@link BiShortToDoubleFunction} 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 double}.
 *
 * @param after The operator to apply after this function is applied
 * @return A composed {@code BiShortToDoubleFunction} 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
 * double}./* w ww  . java2 s  . c om*/
 */
@Nonnull
default BiShortToDoubleFunction andThenToDouble(@Nonnull final DoubleUnaryOperator after) {
    Objects.requireNonNull(after);
    return (value1, value2) -> after.applyAsDouble(applyAsDouble(value1, value2));
}

From source file:at.gridtec.lambda4j.function.bi.conversion.BiIntToDoubleFunction.java

/**
 * Returns a composed {@link BiIntToDoubleFunction} 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 double}.
 *
 * @param after The operator to apply after this function is applied
 * @return A composed {@code BiIntToDoubleFunction} 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
 * double}./*w  w  w.  ja va2 s  . co m*/
 */
@Nonnull
default BiIntToDoubleFunction andThenToDouble(@Nonnull final DoubleUnaryOperator after) {
    Objects.requireNonNull(after);
    return (value1, value2) -> after.applyAsDouble(applyAsDouble(value1, value2));
}

From source file:at.gridtec.lambda4j.function.bi.conversion.BiLongToDoubleFunction.java

/**
 * Returns a composed {@link BiLongToDoubleFunction} 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 double}.
 *
 * @param after The operator to apply after this function is applied
 * @return A composed {@code BiLongToDoubleFunction} 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
 * double}./*from  ww w . j  av  a  2 s .c  o  m*/
 */
@Nonnull
default BiLongToDoubleFunction andThenToDouble(@Nonnull final DoubleUnaryOperator after) {
    Objects.requireNonNull(after);
    return (value1, value2) -> after.applyAsDouble(applyAsDouble(value1, value2));
}

From source file:at.gridtec.lambda4j.function.bi.obj.ObjDoubleToDoubleFunction.java

/**
 * Returns a composed {@link ObjDoubleToDoubleFunction} 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 double}.
 *
 * @param after The operator 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} 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
 * double}./*from  w ww .  j a v  a  2 s .co m*/
 */
@Nonnull
default ObjDoubleToDoubleFunction<T> andThenToDouble(@Nonnull final DoubleUnaryOperator after) {
    Objects.requireNonNull(after);
    return (t, value) -> after.applyAsDouble(applyAsDouble(t, value));
}

From source file:at.gridtec.lambda4j.function.bi.obj.ObjBooleanToDoubleFunction.java

/**
 * Returns a composed {@link ObjBooleanToDoubleFunction} 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 double}.
 *
 * @param after The operator 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} 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
 * double}./*from w  w  w .j  a  v  a 2s .co  m*/
 */
@Nonnull
default ObjBooleanToDoubleFunction<T> andThenToDouble(@Nonnull final DoubleUnaryOperator after) {
    Objects.requireNonNull(after);
    return (t, value) -> after.applyAsDouble(applyAsDouble(t, value));
}

From source file:at.gridtec.lambda4j.function.bi.obj.ObjByteToDoubleFunction.java

/**
 * Returns a composed {@link ObjByteToDoubleFunction} 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 double}.
 *
 * @param after The operator 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} 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
 * double}.//from ww  w  .  j  a v  a2  s  .com
 */
@Nonnull
default ObjByteToDoubleFunction<T> andThenToDouble(@Nonnull final DoubleUnaryOperator after) {
    Objects.requireNonNull(after);
    return (t, value) -> after.applyAsDouble(applyAsDouble(t, value));
}

From source file:at.gridtec.lambda4j.function.bi.obj.ObjCharToDoubleFunction.java

/**
 * Returns a composed {@link ObjCharToDoubleFunction} 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 double}.
 *
 * @param after The operator 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} 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
 * double}./*w w w  .  ja v  a2 s  . co  m*/
 */
@Nonnull
default ObjCharToDoubleFunction<T> andThenToDouble(@Nonnull final DoubleUnaryOperator after) {
    Objects.requireNonNull(after);
    return (t, value) -> after.applyAsDouble(applyAsDouble(t, value));
}

From source file:at.gridtec.lambda4j.function.bi.obj.ObjFloatToDoubleFunction.java

/**
 * Returns a composed {@link ObjFloatToDoubleFunction} 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 double}.
 *
 * @param after The operator 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} 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
 * double}.//w w w  . j  av  a  2 s. c  o  m
 */
@Nonnull
default ObjFloatToDoubleFunction<T> andThenToDouble(@Nonnull final DoubleUnaryOperator after) {
    Objects.requireNonNull(after);
    return (t, value) -> after.applyAsDouble(applyAsDouble(t, value));
}

From source file:at.gridtec.lambda4j.function.bi.obj.ObjShortToDoubleFunction.java

/**
 * Returns a composed {@link ObjShortToDoubleFunction} 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 double}.
 *
 * @param after The operator 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} 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
 * double}.//  w w  w. java  2  s  .  c  o  m
 */
@Nonnull
default ObjShortToDoubleFunction<T> andThenToDouble(@Nonnull final DoubleUnaryOperator after) {
    Objects.requireNonNull(after);
    return (t, value) -> after.applyAsDouble(applyAsDouble(t, value));
}

From source file:at.gridtec.lambda4j.function.bi.obj.ObjIntToDoubleFunction.java

/**
 * Returns a composed {@link ObjIntToDoubleFunction} 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 double}.
 *
 * @param after The operator 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} 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
 * double}.//from w  w w. j av a 2s  .co m
 */
@Nonnull
default ObjIntToDoubleFunction<T> andThenToDouble(@Nonnull final DoubleUnaryOperator after) {
    Objects.requireNonNull(after);
    return (t, value) -> after.applyAsDouble(applyAsDouble(t, value));
}