Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Methods](https://developer.android.com/reference/java/util/function/IntConsumer#pubmethods)

# IntConsumer

` public interface IntConsumer `   
` `

|---|
| java.util.function.IntConsumer |

Known indirect subclasses [IntStream.Builder](https://developer.android.com/reference/java/util/stream/IntStream.Builder), [IntSummaryStatistics](https://developer.android.com/reference/java/util/IntSummaryStatistics), [LongSummaryStatistics](https://developer.android.com/reference/java/util/LongSummaryStatistics) [IntStream.Builder](https://developer.android.com/reference/java/util/stream/IntStream.Builder) A mutable builder for an `IntStream`. [IntSummaryStatistics](https://developer.android.com/reference/java/util/IntSummaryStatistics) A state object for collecting statistics such as count, min, max, sum, and average. [LongSummaryStatistics](https://developer.android.com/reference/java/util/LongSummaryStatistics) A state object for collecting statistics such as count, min, max, sum, and average.   

*** ** * ** ***

Represents an operation that accepts a single `int`-valued argument and returns no result. This is the primitive type specialization of `https://developer.android.com/reference/java/util/function/Consumer` for `int`. Unlike most other functional interfaces, `IntConsumer` is expected to operate via side-effects.

This is a [functional interface](https://developer.android.com/reference/java/util/function/package-summary) whose functional method is `https://developer.android.com/reference/java/util/function/IntConsumer#accept(int)`.
**See also:**

- `https://developer.android.com/reference/java/util/function/Consumer`

## Summary

| ### Public methods ||
|---|---|
| ` abstract void` | ` https://developer.android.com/reference/java/util/function/IntConsumer#accept(int)(int value) ` Performs this operation on the given argument. |
| ` default https://developer.android.com/reference/java/util/function/IntConsumer` | ` https://developer.android.com/reference/java/util/function/IntConsumer#andThen(java.util.function.IntConsumer)(https://developer.android.com/reference/java/util/function/IntConsumer after) ` Returns a composed `IntConsumer` that performs, in sequence, this operation followed by the `after` operation. |

## Public methods

### accept

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract void accept (int value)
```

Performs this operation on the given argument.

<br />

| Parameters ||
|---|---|
| `value` | `int`: the input argument <br /> |

### andThen

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public IntConsumer andThen (IntConsumer after)
```

Returns a composed `IntConsumer` 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.

<br />

| Parameters ||
|---|---|
| `after` | `IntConsumer`: the operation to perform after this operation <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/function/IntConsumer` | a composed `IntConsumer` that performs in sequence this operation followed by the `after` operation <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/NullPointerException` | if `after` is null |