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.operator.binary.LongBinaryOperator2.java

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

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

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

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

/**
 * Returns a composed {@link TriCharConsumer} 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 TriCharConsumer} 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  .j  av  a  2s. c o  m*/
@Nonnull
default TriCharConsumer consume(@Nonnull final LongConsumer consumer) {
    Objects.requireNonNull(consumer);
    return (value1, value2, value3) -> consumer.accept(applyAsLong(value1, value2, value3));
}

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

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

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

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

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

/**
 * Returns a composed {@link TriShortConsumer} 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 TriShortConsumer} 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 www.ja v  a  2  s  .co  m
@Nonnull
default TriShortConsumer consume(@Nonnull final LongConsumer consumer) {
    Objects.requireNonNull(consumer);
    return (value1, value2, value3) -> consumer.accept(applyAsLong(value1, value2, value3));
}

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

/**
 * Returns a composed {@link TriBooleanConsumer} 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 TriBooleanConsumer} 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 ww w.j a  v a 2 s  .co m
@Nonnull
default TriBooleanConsumer consume(@Nonnull final LongConsumer consumer) {
    Objects.requireNonNull(consumer);
    return (value1, value2, value3) -> consumer.accept(applyAsLong(value1, value2, value3));
}

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

/**
 * Returns a composed {@link TriDoubleConsumer} 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 TriDoubleConsumer} 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.  ja va2s.  co m
@Nonnull
default TriDoubleConsumer consume(@Nonnull final LongConsumer consumer) {
    Objects.requireNonNull(consumer);
    return (value1, value2, value3) -> consumer.accept(applyAsLong(value1, value2, value3));
}

From source file:at.gridtec.lambda4j.operator.ternary.LongTernaryOperator.java

/**
 * Returns a composed {@link TriLongConsumer} that fist applies this operator 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 TriLongConsumer} that first applies this operator 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.c  om
@Nonnull
default TriLongConsumer consume(@Nonnull final LongConsumer consumer) {
    Objects.requireNonNull(consumer);
    return (value1, value2, value3) -> consumer.accept(applyAsLong(value1, value2, value3));
}

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

/**
 * Returns a composed {@link ObjBiLongConsumer} 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 ObjBiLongConsumer} 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 a  va2  s.  c o m*/
@Nonnull
default ObjBiLongConsumer<T> consume(@Nonnull final LongConsumer consumer) {
    Objects.requireNonNull(consumer);
    return (t, value1, value2) -> consumer.accept(applyAsLong(t, value1, value2));
}