# LongFunction

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

# LongFunction

`
public


interface
LongFunction
`  
`


`

|--------------------------------------|
| java.util.function.LongFunction\<R\> |

<br />

*** ** * ** ***

Represents a function that accepts a long-valued argument and produces a result. This is the`long`-consuming 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[apply(long)](https://developer.android.com/reference/java/util/function/LongFunction#apply(long)).  
**See also:**

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

## Summary

|                                                                             ### Public methods                                                                             ||
|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract R` | ` `[apply](https://developer.android.com/reference/java/util/function/LongFunction#apply(long))`(long value) ` Applies this function to the given argument. |

## Public methods

### apply

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

```
public abstract R apply (long value)
```

Applies this function to the given argument.

<br />

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

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