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.operator.ternary.IntTernaryOperator.java

/**
 * Returns a composed {@link TriIntConsumer} 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 TriIntConsumer} 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}
 *//*from   w w  w . j a va2 s .  c o  m*/
@Nonnull
default TriIntConsumer 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.obj.ObjBiIntToIntFunction.java

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

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

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

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

/**
 * Returns a composed {@link ObjBiCharConsumer} 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 ObjBiCharConsumer} 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 ObjBiCharConsumer<T> consume(@Nonnull final IntConsumer consumer) {
    Objects.requireNonNull(consumer);
    return (t, value1, value2) -> consumer.accept(applyAsInt(t, value1, value2));
}

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

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

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

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

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

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

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

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

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

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

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

/**
 * Returns a composed {@link BiObjIntConsumer} 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 BiObjIntConsumer} 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  ww.j  a v a2  s.c om*/
@Nonnull
default BiObjIntConsumer<T, U> consume(@Nonnull final IntConsumer consumer) {
    Objects.requireNonNull(consumer);
    return (t, u, value) -> consumer.accept(applyAsInt(t, u, value));
}