concept function type in category java

This is an excerpt from Manning's book Functional Programming in Java: How functional techniques improve your Java programs.

This is an excerpt from Manning's book JavaFX in Action.
Function types in JavaFX are incredibly useful. Not only do they provide a neat way of creating event handlers (see anonymous functions, later in this chapter) but they allow us to plug bits of bespoke code into existing software algorithms. Functions in JavaFX Script are first-class objects, meaning we can have variables of function type and can pass functions into other functions as parameters. Listing 3.13 shows a simple example.
The first four lines are the function’s signature; unfortunately it’s quite long, so I split it over four separate lines in an attempt to make it more readable. You can see the function is called checkGroup, and it accepts two parameters: an Integer and a function type. The function type accepts two Integer variables and gives a single Integer in return. The Void on the end signifies checkGroup() has no return value.