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.ObjBiIntToLongFunction.java

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/**
 * Returns a composed {@link BiObjLongConsumer} 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 BiObjLongConsumer} 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  . jav  a  2  s .com
@Nonnull
default BiObjLongConsumer<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.BiObjBooleanToLongFunction.java

/**
 * Returns a composed {@link BiObjBooleanConsumer} 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 BiObjBooleanConsumer} 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 2s . co m*/
@Nonnull
default BiObjBooleanConsumer<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.BiObjByteToLongFunction.java

/**
 * Returns a composed {@link BiObjByteConsumer} 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 BiObjByteConsumer} 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  v  a  2  s  .co m
@Nonnull
default BiObjByteConsumer<T, U> consume(@Nonnull final LongConsumer consumer) {
    Objects.requireNonNull(consumer);
    return (t, u, value) -> consumer.accept(applyAsLong(t, u, value));
}