# Consumer

# Consumer

Artifact:[androidx.window.extensions.core:core](https://developer.android.com/jetpack/androidx/releases/window-extensions-core)  
[View Source](https://cs.android.com/search?q=file:androidx/window/extensions/core/util/function/Consumer.java+class:androidx.window.extensions.core.util.function.Consumer)  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/window-extensions-core#1.0.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/window/extensions/core/util/function/Consumer "View this page in Java")

<br />

```
@FunctionalInterface
interface Consumer<T>
```

<br />

*** ** * ** ***

Represents a function that accepts an argument and produces no result. It is used internally to avoid using Java 8 functional interface that leads to desugaring and Proguard shrinking.  

| Parameters |
|------------|-----------------------------------------|
| `<T>`      | : the type of the input of the function |

|                                       See also                                       |
|--------------------------------------------------------------------------------------|---|
| [Consumer](https://developer.android.com/reference/java/util/function/Consumer.html) |   |

## Summary

|                             ### Public functions                              |
|-------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [accept](https://developer.android.com/reference/kotlin/androidx/window/extensions/core/util/function/Consumer#accept(T))`(t: T!)` Performs the operation on the given argument |

## Public functions

### accept

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/window-extensions-core#1.0.0)  

```
fun accept(t: T!): Unit
```

Performs the operation on the given argument  

| Parameters |
|------------|--------------------|
| `t: T!`    | the input argument |