LongToIntFunction applyAsInt applies this function to the given argument.
applyAsInt
has the following syntax.
int applyAsInt(long value)
The following example shows how to use applyAsInt
.
import java.util.function.LongToIntFunction; // w w w .java2s . co m public class Main { public static void main(String[] args) { LongToIntFunction i = (l) -> (int)l; System.out.println(i.applyAsInt(Long.MAX_VALUE)); } }
The code above generates the following result.