Core concept
Predicate even = n -> n % 2 == 0;
Consumer print = System.out::println; Advertisement
How it works
Primitive variants: IntFunction, IntPredicate etc avoid boxing.
Advertisement
Trade-offs + gotchas
Everywhere FP style.
Predicate even = n -> n % 2 == 0;
Consumer print = System.out::println; Primitive variants: IntFunction, IntPredicate etc avoid boxing.
Everywhere FP style.