# Function

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/Function.java+class:androidx.window.extensions.core.util.function.Function) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/window-extensions-core#1.0.0)

*** ** * ** ***


```
@FunctionalInterface
public interface Function<T, R>
```

<br />

*** ** * ** ***

Represents a function that accepts an argument and produces a 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 |
| `<R>` | : the type of the output of the function |

| See also |
|---|---|
| `https://developer.android.com/reference/java/util/function/Function.html` |   |

## Summary

| ### Public methods |
|---|---|
| `abstract R` | `https://developer.android.com/reference/androidx/window/extensions/core/util/function/Function#apply(T)(T t)` Applies this function to the given argument. |

## Public methods

### apply

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

```
abstract R apply(T t)
```

Applies this function to the given argument.

| Parameters |
|---|---|
| `T t` | the function argument |

| Returns |
|---|---|
| `R` | the function result |