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.conversion.BiCharToDoubleFunction.java

/**
 * Returns a composed {@link BiCharConsumer} 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 BiCharConsumer} 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  a  v  a 2  s  .  com*/
@Nonnull
default BiCharConsumer consume(@Nonnull final DoubleConsumer consumer) {
    Objects.requireNonNull(consumer);
    return (value1, value2) -> consumer.accept(applyAsDouble(value1, value2));
}

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

/**
 * Returns a composed {@link BiFloatConsumer} 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 BiFloatConsumer} 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  a2s . com
@Nonnull
default BiFloatConsumer consume(@Nonnull final DoubleConsumer consumer) {
    Objects.requireNonNull(consumer);
    return (value1, value2) -> consumer.accept(applyAsDouble(value1, value2));
}

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

/**
 * Returns a composed {@link BiShortConsumer} 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 BiShortConsumer} 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  . j  a  va  2  s  . c  om*/
@Nonnull
default BiShortConsumer consume(@Nonnull final DoubleConsumer consumer) {
    Objects.requireNonNull(consumer);
    return (value1, value2) -> consumer.accept(applyAsDouble(value1, value2));
}

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

/**
 * Returns a composed {@link BiIntConsumer} 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 BiIntConsumer} 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 ww .  j  a  v  a2  s  . c  o  m*/
@Nonnull
default BiIntConsumer consume(@Nonnull final DoubleConsumer consumer) {
    Objects.requireNonNull(consumer);
    return (value1, value2) -> consumer.accept(applyAsDouble(value1, value2));
}

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

/**
 * Returns a composed {@link BiLongConsumer} 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 BiLongConsumer} 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 a2 s  .c  om
@Nonnull
default BiLongConsumer consume(@Nonnull final DoubleConsumer consumer) {
    Objects.requireNonNull(consumer);
    return (value1, value2) -> consumer.accept(applyAsDouble(value1, value2));
}

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

/**
 * Returns a composed {@link ObjDoubleConsumer2} 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 ObjDoubleConsumer2} 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  ava  2s . c o m*/
@Nonnull
default ObjDoubleConsumer2<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.ObjBooleanToDoubleFunction.java

/**
 * Returns a composed {@link ObjBooleanConsumer} 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 ObjBooleanConsumer} 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 .j av  a  2  s .com
@Nonnull
default ObjBooleanConsumer<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.ObjByteToDoubleFunction.java

/**
 * Returns a composed {@link ObjByteConsumer} 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 ObjByteConsumer} 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.c  om
@Nonnull
default ObjByteConsumer<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.ObjCharToDoubleFunction.java

/**
 * Returns a composed {@link ObjCharConsumer} 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 ObjCharConsumer} 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}
 *//*ww w  .  j a v a 2s. c om*/
@Nonnull
default ObjCharConsumer<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.ObjFloatToDoubleFunction.java

/**
 * Returns a composed {@link ObjFloatConsumer} 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 ObjFloatConsumer} 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.  j  av a2  s  .c  om
@Nonnull
default ObjFloatConsumer<T> consume(@Nonnull final DoubleConsumer consumer) {
    Objects.requireNonNull(consumer);
    return (t, value) -> consumer.accept(applyAsDouble(t, value));
}