Added in API level 24

ToIntFunction

@FunctionalInterface interface ToIntFunction<T : Any!>
java.util.function.ToIntFunction

Represents a function that produces an int-valued result. This is the int-producing primitive specialization for Function.

This is a functional interface whose functional method is applyAsInt(java.lang.Object).

Summary

Public methods
abstract Int
applyAsInt(value: T)

Applies this function to the given argument.

Public methods

applyAsInt

Added in API level 24
abstract fun applyAsInt(value: T): Int

Applies this function to the given argument.

Parameters
value T: the function argument
Return
Int the function result