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

# ToLongFunction


`
public


interface
ToLongFunction
`


`


`

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

<br />

*** ** * ** ***

Represents a function that produces a long-valued result. This is the
`long`-producing primitive specialization for `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 `https://developer.android.com/reference/java/util/function/ToLongFunction#applyAsLong(T)`.
**See also:**

- `https://developer.android.com/reference/java/util/function/Function`

## Summary

| ### Public methods ||
|---|---|
| ` abstract long` | ` https://developer.android.com/reference/java/util/function/ToLongFunction#applyAsLong(T)(T value) ` Applies this function to the given argument. |

## Public methods

### applyAsLong

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

```
public abstract long applyAsLong (T value)
```

Applies this function to the given argument.

<br />

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

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