# ToIntFunction

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

# ToIntFunction


`
public


interface
ToIntFunction
`


`


`

|---------------------------------------|
| java.util.function.ToIntFunction\<T\> |

<br />

*** ** * ** ***

Represents a function that produces an int-valued result. This is the
`int`-producing primitive specialization for [Function](https://developer.android.com/reference/java/util/function/Function).

This is a [functional interface](https://developer.android.com/reference/java/util/function/package-summary)
whose functional method is [applyAsInt(java.lang.Object)](https://developer.android.com/reference/java/util/function/ToIntFunction#applyAsInt(T)).  
**See also:**

- [Function](https://developer.android.com/reference/java/util/function/Function)

## Summary

|                                                                                ### Public methods                                                                                 ||
|-----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract int` | ` `[applyAsInt](https://developer.android.com/reference/java/util/function/ToIntFunction#applyAsInt(T))`(T value) ` Applies this function to the given argument. |

## Public methods

### applyAsInt

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

```
public abstract int applyAsInt (T value)
```

Applies this function to the given argument.

<br />

|                 Parameters                 ||
|---------|-----------------------------------|
| `value` | `T`: the function argument <br /> |

|              Returns              ||
|-------|----------------------------|
| `int` | the function result <br /> |