List of usage examples for java.util.function LongConsumer accept
void accept(long value);
From source file:at.gridtec.lambda4j.function.bi.conversion.BiIntToLongFunction.java
/** * Returns a composed {@link BiIntConsumer} 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 BiIntConsumer} 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 om @Nonnull default BiIntConsumer consume(@Nonnull final LongConsumer consumer) { Objects.requireNonNull(consumer); return (value1, value2) -> consumer.accept(applyAsLong(value1, value2)); }
From source file:at.gridtec.lambda4j.function.bi.conversion.BiDoubleToLongFunction.java
/** * Returns a composed {@link BiDoubleConsumer} 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 BiDoubleConsumer} 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 . co m @Nonnull default BiDoubleConsumer consume(@Nonnull final LongConsumer consumer) { Objects.requireNonNull(consumer); return (value1, value2) -> consumer.accept(applyAsLong(value1, value2)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjLongToLongFunction.java
/** * Returns a composed {@link ObjLongConsumer2} 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 ObjLongConsumer2} 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 v a 2 s . c o m*/ @Nonnull default ObjLongConsumer2<T> consume(@Nonnull final LongConsumer consumer) { Objects.requireNonNull(consumer); return (t, value) -> consumer.accept(applyAsLong(t, value)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjByteToLongFunction.java
/** * Returns a composed {@link ObjByteConsumer} 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 ObjByteConsumer} 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 av a2 s . c o m*/ @Nonnull default ObjByteConsumer<T> consume(@Nonnull final LongConsumer consumer) { Objects.requireNonNull(consumer); return (t, value) -> consumer.accept(applyAsLong(t, value)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjCharToLongFunction.java
/** * Returns a composed {@link ObjCharConsumer} 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 ObjCharConsumer} 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 va 2 s. c o m @Nonnull default ObjCharConsumer<T> consume(@Nonnull final LongConsumer consumer) { Objects.requireNonNull(consumer); return (t, value) -> consumer.accept(applyAsLong(t, value)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjFloatToLongFunction.java
/** * Returns a composed {@link ObjFloatConsumer} 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 ObjFloatConsumer} 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 2s . co m*/ @Nonnull default ObjFloatConsumer<T> consume(@Nonnull final LongConsumer consumer) { Objects.requireNonNull(consumer); return (t, value) -> consumer.accept(applyAsLong(t, value)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjShortToLongFunction.java
/** * Returns a composed {@link ObjShortConsumer} 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 ObjShortConsumer} 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. j a va 2 s . co m @Nonnull default ObjShortConsumer<T> consume(@Nonnull final LongConsumer consumer) { Objects.requireNonNull(consumer); return (t, value) -> consumer.accept(applyAsLong(t, value)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjBooleanToLongFunction.java
/** * Returns a composed {@link ObjBooleanConsumer} 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 ObjBooleanConsumer} 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 va2 s. com @Nonnull default ObjBooleanConsumer<T> consume(@Nonnull final LongConsumer consumer) { Objects.requireNonNull(consumer); return (t, value) -> consumer.accept(applyAsLong(t, value)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjIntToLongFunction.java
/** * Returns a composed {@link ObjIntConsumer2} 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 ObjIntConsumer2} 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 .jav a 2 s . c o m*/ @Nonnull default ObjIntConsumer2<T> consume(@Nonnull final LongConsumer consumer) { Objects.requireNonNull(consumer); return (t, value) -> consumer.accept(applyAsLong(t, value)); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjDoubleToLongFunction.java
/** * Returns a composed {@link ObjDoubleConsumer2} 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 ObjDoubleConsumer2} 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. jav a 2 s.c om*/ @Nonnull default ObjDoubleConsumer2<T> consume(@Nonnull final LongConsumer consumer) { Objects.requireNonNull(consumer); return (t, value) -> consumer.accept(applyAsLong(t, value)); }