Example usage for java.util.function IntConsumer accept

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

Introduction

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

Prototype

void accept(int value);

Source Link

Document

Performs this operation on the given argument.

Usage

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

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

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

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

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

/**
 * Returns a composed {@link BiIntConsumer} that fist applies this operator to its input, and then consumes the
 * result using the given {@link IntConsumer}. 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 operator to its input, and then consumes the
 * result using the given {@code IntConsumer}.
 * @throws NullPointerException If given argument is {@code null}
 */// w ww .  j  a v  a2  s .c  om
@Nonnull
default BiIntConsumer consume(@Nonnull final IntConsumer consumer) {
    Objects.requireNonNull(consumer);
    return (value1, value2) -> consumer.accept(applyAsInt(value1, value2));
}

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

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

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

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

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

/**
 * Returns a composed {@link TriFloatConsumer} that fist applies this function to its input, and then consumes the
 * result using the given {@link IntConsumer}. 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 IntConsumer}.
 * @throws NullPointerException If given argument is {@code null}
 *//*from   w w  w  . jav  a 2 s.  c  om*/
@Nonnull
default TriFloatConsumer consume(@Nonnull final IntConsumer consumer) {
    Objects.requireNonNull(consumer);
    return (value1, value2, value3) -> consumer.accept(applyAsInt(value1, value2, value3));
}

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

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

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

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

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

/**
 * Returns a composed {@link TriBooleanConsumer} that fist applies this function to its input, and then consumes the
 * result using the given {@link IntConsumer}. 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 IntConsumer}.
 * @throws NullPointerException If given argument is {@code null}
 *///from   www. j av a  2 s .  c om
@Nonnull
default TriBooleanConsumer consume(@Nonnull final IntConsumer consumer) {
    Objects.requireNonNull(consumer);
    return (value1, value2, value3) -> consumer.accept(applyAsInt(value1, value2, value3));
}

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

/**
 * Returns a composed {@link TriDoubleConsumer} that fist applies this function to its input, and then consumes the
 * result using the given {@link IntConsumer}. 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 IntConsumer}.
 * @throws NullPointerException If given argument is {@code null}
 *//* w  w w .  java 2s . com*/
@Nonnull
default TriDoubleConsumer consume(@Nonnull final IntConsumer consumer) {
    Objects.requireNonNull(consumer);
    return (value1, value2, value3) -> consumer.accept(applyAsInt(value1, value2, value3));
}