Example usage for java.util.function DoubleConsumer accept

List of usage examples for java.util.function DoubleConsumer accept

Introduction

In this page you can find the example usage for java.util.function DoubleConsumer accept.

Prototype

void accept(double value);

Source Link

Document

Performs this operation on the given argument.

Usage

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

/**
 * Returns a composed {@link ObjShortConsumer} that fist applies this function to its input, and then consumes the
 * result using the given {@link DoubleConsumer}. If evaluation of either operation throws an exception, it is
 * relayed to the caller of the composed operation.
 *
 * @param consumer The operation which consumes the result from this operation
 * @return A composed {@code ObjShortConsumer} that first applies this function to its input, and then consumes the
 * result using the given {@code DoubleConsumer}.
 * @throws NullPointerException If given argument is {@code null}
 *///from   ww  w  . j  a  v a 2  s.  co m
@Nonnull
default ObjShortConsumer<T> consume(@Nonnull final DoubleConsumer consumer) {
    Objects.requireNonNull(consumer);
    return (t, value) -> consumer.accept(applyAsDouble(t, value));
}

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

/**
 * Returns a composed {@link ObjIntConsumer2} that fist applies this function to its input, and then consumes the
 * result using the given {@link DoubleConsumer}. If evaluation of either operation throws an exception, it is
 * relayed to the caller of the composed operation.
 *
 * @param consumer The operation which consumes the result from this operation
 * @return A composed {@code ObjIntConsumer2} that first applies this function to its input, and then consumes the
 * result using the given {@code DoubleConsumer}.
 * @throws NullPointerException If given argument is {@code null}
 *///from   w  w w  .  ja  v  a  2 s .c om
@Nonnull
default ObjIntConsumer2<T> consume(@Nonnull final DoubleConsumer consumer) {
    Objects.requireNonNull(consumer);
    return (t, value) -> consumer.accept(applyAsDouble(t, value));
}

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

/**
 * Returns a composed {@link ObjLongConsumer2} that fist applies this function to its input, and then consumes the
 * result using the given {@link DoubleConsumer}. If evaluation of either operation throws an exception, it is
 * relayed to the caller of the composed operation.
 *
 * @param consumer The operation which consumes the result from this operation
 * @return A composed {@code ObjLongConsumer2} that first applies this function to its input, and then consumes the
 * result using the given {@code DoubleConsumer}.
 * @throws NullPointerException If given argument is {@code null}
 *///www  . ja  v a 2 s .co m
@Nonnull
default ObjLongConsumer2<T> consume(@Nonnull final DoubleConsumer consumer) {
    Objects.requireNonNull(consumer);
    return (t, value) -> consumer.accept(applyAsDouble(t, value));
}

From source file:at.gridtec.lambda4j.operator.binary.DoubleBinaryOperator2.java

/**
 * Returns a composed {@link BiDoubleConsumer} that fist applies this operator to its input, and then consumes the
 * result using the given {@link DoubleConsumer}. If evaluation of either operation throws an exception, it is
 * relayed to the caller of the composed operation.
 *
 * @param consumer The operation which consumes the result from this operation
 * @return A composed {@code BiDoubleConsumer} that first applies this operator to its input, and then consumes the
 * result using the given {@code DoubleConsumer}.
 * @throws NullPointerException If given argument is {@code null}
 *///ww  w. ja  v  a  2 s.  co m
@Nonnull
default BiDoubleConsumer consume(@Nonnull final DoubleConsumer consumer) {
    Objects.requireNonNull(consumer);
    return (value1, value2) -> consumer.accept(applyAsDouble(value1, value2));
}

From source file:at.gridtec.lambda4j.function.tri.conversion.TriBooleanToDoubleFunction.java

/**
 * Returns a composed {@link TriBooleanConsumer} that fist applies this function to its input, and then consumes the
 * result using the given {@link DoubleConsumer}. If evaluation of either operation throws an exception, it is
 * relayed to the caller of the composed operation.
 *
 * @param consumer The operation which consumes the result from this operation
 * @return A composed {@code TriBooleanConsumer} that first applies this function to its input, and then consumes
 * the result using the given {@code DoubleConsumer}.
 * @throws NullPointerException If given argument is {@code null}
 *///from   www.  ja va  2  s.com
@Nonnull
default TriBooleanConsumer consume(@Nonnull final DoubleConsumer consumer) {
    Objects.requireNonNull(consumer);
    return (value1, value2, value3) -> consumer.accept(applyAsDouble(value1, value2, value3));
}

From source file:at.gridtec.lambda4j.function.tri.conversion.TriByteToDoubleFunction.java

/**
 * Returns a composed {@link TriByteConsumer} that fist applies this function to its input, and then consumes the
 * result using the given {@link DoubleConsumer}. If evaluation of either operation throws an exception, it is
 * relayed to the caller of the composed operation.
 *
 * @param consumer The operation which consumes the result from this operation
 * @return A composed {@code TriByteConsumer} that first applies this function to its input, and then consumes the
 * result using the given {@code DoubleConsumer}.
 * @throws NullPointerException If given argument is {@code null}
 *///w  ww  .  jav  a  2  s . co m
@Nonnull
default TriByteConsumer consume(@Nonnull final DoubleConsumer consumer) {
    Objects.requireNonNull(consumer);
    return (value1, value2, value3) -> consumer.accept(applyAsDouble(value1, value2, value3));
}

From source file:at.gridtec.lambda4j.function.tri.conversion.TriCharToDoubleFunction.java

/**
 * Returns a composed {@link TriCharConsumer} that fist applies this function to its input, and then consumes the
 * result using the given {@link DoubleConsumer}. If evaluation of either operation throws an exception, it is
 * relayed to the caller of the composed operation.
 *
 * @param consumer The operation which consumes the result from this operation
 * @return A composed {@code TriCharConsumer} that first applies this function to its input, and then consumes the
 * result using the given {@code DoubleConsumer}.
 * @throws NullPointerException If given argument is {@code null}
 *///from  w  w w.ja va 2 s.com
@Nonnull
default TriCharConsumer consume(@Nonnull final DoubleConsumer consumer) {
    Objects.requireNonNull(consumer);
    return (value1, value2, value3) -> consumer.accept(applyAsDouble(value1, value2, value3));
}

From source file:at.gridtec.lambda4j.function.tri.conversion.TriFloatToDoubleFunction.java

/**
 * Returns a composed {@link TriFloatConsumer} that fist applies this function to its input, and then consumes the
 * result using the given {@link DoubleConsumer}. If evaluation of either operation throws an exception, it is
 * relayed to the caller of the composed operation.
 *
 * @param consumer The operation which consumes the result from this operation
 * @return A composed {@code TriFloatConsumer} that first applies this function to its input, and then consumes the
 * result using the given {@code DoubleConsumer}.
 * @throws NullPointerException If given argument is {@code null}
 *///  w w w  . j  av  a2  s  .  c om
@Nonnull
default TriFloatConsumer consume(@Nonnull final DoubleConsumer consumer) {
    Objects.requireNonNull(consumer);
    return (value1, value2, value3) -> consumer.accept(applyAsDouble(value1, value2, value3));
}

From source file:at.gridtec.lambda4j.function.tri.conversion.TriIntToDoubleFunction.java

/**
 * Returns a composed {@link TriIntConsumer} that fist applies this function to its input, and then consumes the
 * result using the given {@link DoubleConsumer}. If evaluation of either operation throws an exception, it is
 * relayed to the caller of the composed operation.
 *
 * @param consumer The operation which consumes the result from this operation
 * @return A composed {@code TriIntConsumer} that first applies this function to its input, and then consumes the
 * result using the given {@code DoubleConsumer}.
 * @throws NullPointerException If given argument is {@code null}
 *///from  www .j a  va2  s.  com
@Nonnull
default TriIntConsumer consume(@Nonnull final DoubleConsumer consumer) {
    Objects.requireNonNull(consumer);
    return (value1, value2, value3) -> consumer.accept(applyAsDouble(value1, value2, value3));
}

From source file:at.gridtec.lambda4j.function.tri.conversion.TriLongToDoubleFunction.java

/**
 * Returns a composed {@link TriLongConsumer} that fist applies this function to its input, and then consumes the
 * result using the given {@link DoubleConsumer}. If evaluation of either operation throws an exception, it is
 * relayed to the caller of the composed operation.
 *
 * @param consumer The operation which consumes the result from this operation
 * @return A composed {@code TriLongConsumer} that first applies this function to its input, and then consumes the
 * result using the given {@code DoubleConsumer}.
 * @throws NullPointerException If given argument is {@code null}
 *//*from www .  ja v  a 2  s  .c  om*/
@Nonnull
default TriLongConsumer consume(@Nonnull final DoubleConsumer consumer) {
    Objects.requireNonNull(consumer);
    return (value1, value2, value3) -> consumer.accept(applyAsDouble(value1, value2, value3));
}