# Function

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/util/Function.kt+class:androidx.core.util.Function) Added in [1.12.0](https://developer.android.com/jetpack/androidx/releases/core#1.12.0)

*** ** * ** ***


```
public fun interface Function<T extends Object, R extends Object>
```

<br />

*** ** * ** ***

Compat version of `https://developer.android.com/reference/java/util/function/Function.html`

| Parameters |
|---|---|
| `<T extends https://developer.android.com/reference/java/lang/Object.html>` | the type of the input to the operation |
| `<R extends https://developer.android.com/reference/java/lang/Object.html>` | the type of the output of the function |

## Summary

| ### Public methods |
|---|---|
| `abstract @https://developer.android.com/reference/androidx/annotation/NonNull R` | `https://developer.android.com/reference/androidx/core/util/Function#apply(kotlin.Any)(@https://developer.android.com/reference/androidx/annotation/NonNull T value)` Applies the function to the argument parameter. |

## Public methods

### apply

Added in [1.12.0](https://developer.android.com/jetpack/androidx/releases/core#1.12.0)

```
abstract @NonNull R apply(@NonNull T value)
```

Applies the function to the argument parameter.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull T value` | the argument for the function |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull R` | the result after applying function |