Interface IntFunction
- All Superinterfaces:
Serializable
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
An interface representing a univariate int function.
-
Method Summary
-
Method Details
-
f
int f(int x) Computes the value of the function at x.- Parameters:
x- an integer value.- Returns:
- the function value.
-
apply
default int apply(int x) Computes the value of the function at x. It delegates the computation to f(). This is simply for Scala convenience.- Parameters:
x- an integer value.- Returns:
- the function value.
-