# LongConsumer

public interface **LongConsumer**

|---|---|---|
| Known Indirect Subclasses [LongStream.Builder](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/stream/LongStream.Builder.html), [LongSummaryStatistics](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/LongSummaryStatistics.html) |---|---| | [LongStream.Builder](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/stream/LongStream.Builder.html) | A mutable builder for a `LongStream`. | | [LongSummaryStatistics](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/LongSummaryStatistics.html) | A state object for collecting statistics such as count, min, max, sum, and average. | |||

Represents an operation that accepts a single `long`-valued argument and
returns no result. This is the primitive type specialization of
`https://developers.google.com/j2objc/javadoc/jre/reference/java/util/function/Consumer.html` for `long`. Unlike most other functional interfaces,
`LongConsumer` is expected to operate via side-effects.

This is a [functional interface](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/function/package-summary)
whose functional method is `https://developers.google.com/j2objc/javadoc/jre/reference/java/util/function/LongConsumer.html#accept(long)`.

##### See Also

- `https://developers.google.com/j2objc/javadoc/jre/reference/java/util/function/Consumer.html`

### Public Method Summary

|---|---|
| abstract void | [accept](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/function/LongConsumer.html#accept(long))(long value) Performs this operation on the given argument. |
| [LongConsumer](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/function/LongConsumer.html) | [andThen](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/function/LongConsumer.html#andThen(java.util.function.LongConsumer))([LongConsumer](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/function/LongConsumer.html) after) Returns a composed `LongConsumer` that performs, in sequence, this operation followed by the `after` operation. |

## Public Methods

#### public abstract void
**accept**
(long value)

Performs this operation on the given argument.

##### Parameters

| value | the input argument |
|---|---|

#### public [LongConsumer](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/function/LongConsumer.html)
**andThen**
([LongConsumer](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/function/LongConsumer.html) after)

Returns a composed `LongConsumer` that performs, in sequence, this
operation followed by the `after` operation. If performing either
operation throws an exception, it is relayed to the caller of the
composed operation. If performing this operation throws an exception,
the `after` operation will not be performed.

##### Parameters

| after | the operation to perform after this operation |
|---|---|

##### Returns

- a composed `LongConsumer` that performs in sequence this operation followed by the `after` operation

##### Throws

| [NullPointerException](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/NullPointerException.html) | if `after` is null |
|---|---|