# Function

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

*** ** * ** ***


```
public interface Function<I, O>
```

<br />

*** ** * ** ***

Represents a function.

| Parameters |
|---|---|
| `<I>` | the type of the input to the function |
| `<O>` | the type of the output of the function |

## Summary

| ### Public methods |
|---|---|
| `abstract O` | `https://developer.android.com/reference/androidx/arch/core/util/Function#apply(I)(I input)` Applies this function to the given input. |

## Public methods

### apply

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

```
abstract O apply(I input)
```

Applies this function to the given input.

| Parameters |
|---|---|
| `I input` | the input |

| Returns |
|---|---|
| `O` | the function result. |