Example usage for java.util.function LongConsumer accept

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

Introduction

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

Prototype

void accept(long value);

Source Link

Document

Performs this operation on the given argument.

Usage

From source file:at.gridtec.lambda4j.function.tri.obj.BiObjCharToLongFunction.java

/**
 * Returns a composed {@link BiObjCharConsumer} that fist applies this function to its input, and then consumes the
 * result using the given {@link LongConsumer}. 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 BiObjCharConsumer} that first applies this function to its input, and then consumes the
 * result using the given {@code LongConsumer}.
 * @throws NullPointerException If given argument is {@code null}
 *///w ww.  ja  v  a  2s .c o  m
@Nonnull
default BiObjCharConsumer<T, U> consume(@Nonnull final LongConsumer consumer) {
    Objects.requireNonNull(consumer);
    return (t, u, value) -> consumer.accept(applyAsLong(t, u, value));
}

From source file:at.gridtec.lambda4j.function.tri.obj.BiObjFloatToLongFunction.java

/**
 * Returns a composed {@link BiObjFloatConsumer} that fist applies this function to its input, and then consumes the
 * result using the given {@link LongConsumer}. 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 BiObjFloatConsumer} that first applies this function to its input, and then consumes
 * the result using the given {@code LongConsumer}.
 * @throws NullPointerException If given argument is {@code null}
 *//*from w  w  w.j ava 2  s.  co m*/
@Nonnull
default BiObjFloatConsumer<T, U> consume(@Nonnull final LongConsumer consumer) {
    Objects.requireNonNull(consumer);
    return (t, u, value) -> consumer.accept(applyAsLong(t, u, value));
}

From source file:at.gridtec.lambda4j.function.tri.obj.BiObjShortToLongFunction.java

/**
 * Returns a composed {@link BiObjShortConsumer} that fist applies this function to its input, and then consumes the
 * result using the given {@link LongConsumer}. 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 BiObjShortConsumer} that first applies this function to its input, and then consumes
 * the result using the given {@code LongConsumer}.
 * @throws NullPointerException If given argument is {@code null}
 *///w  w w  .j  a v a  2 s. c om
@Nonnull
default BiObjShortConsumer<T, U> consume(@Nonnull final LongConsumer consumer) {
    Objects.requireNonNull(consumer);
    return (t, u, value) -> consumer.accept(applyAsLong(t, u, value));
}

From source file:at.gridtec.lambda4j.function.tri.obj.BiObjIntToLongFunction.java

/**
 * Returns a composed {@link BiObjIntConsumer} that fist applies this function to its input, and then consumes the
 * result using the given {@link LongConsumer}. 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 BiObjIntConsumer} that first applies this function to its input, and then consumes the
 * result using the given {@code LongConsumer}.
 * @throws NullPointerException If given argument is {@code null}
 *//*ww w .java2 s.  co m*/
@Nonnull
default BiObjIntConsumer<T, U> consume(@Nonnull final LongConsumer consumer) {
    Objects.requireNonNull(consumer);
    return (t, u, value) -> consumer.accept(applyAsLong(t, u, value));
}

From source file:at.gridtec.lambda4j.function.tri.obj.BiObjDoubleToLongFunction.java

/**
 * Returns a composed {@link BiObjDoubleConsumer} that fist applies this function to its input, and then consumes
 * the result using the given {@link LongConsumer}. 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 BiObjDoubleConsumer} that first applies this function to its input, and then consumes
 * the result using the given {@code LongConsumer}.
 * @throws NullPointerException If given argument is {@code null}
 *//*w w  w  . ja  v a2s .co m*/
@Nonnull
default BiObjDoubleConsumer<T, U> consume(@Nonnull final LongConsumer consumer) {
    Objects.requireNonNull(consumer);
    return (t, u, value) -> consumer.accept(applyAsLong(t, u, value));
}