javautilfunctionConsumer
java.util.function is a Java package introduced in Java 8 that defines a set of generic functional interfaces designed to work with lambda expressions and method references. It provides standard building blocks for functional-style programming, enabling behavior to be passed as data and composed or transformed.
Core interfaces include Function<T,R>, which represents a function that takes a T and returns an R and
The package also provides primitive specializations to avoid boxing and unboxing overhead, such as ToIntFunction<T>, ToLongFunction<T>,
Common usage patterns include using Function as map in streams, Predicate for filtering, and Consumer for side-effect