This post demonstrates how to reuse Predicate @FunctionalInterface implementations to reduce duplicate codes in your applications.
How To Use Java 8 Stream Reduce Example
This post shows how to use Java Stream Reduce with example codes. The idea of the reduce operation is the generation of a single result from a collection of values or objects. It is similar to the min and max operations
Java 8 – Convert Iterator to Stream Using StreamSupport
Although not a common scenario, some libraries return Iterators instead of Stream or Collection objects. Why? Because they can. If the Java libraries you are using have methods that return Iterator objects, this will show how to convert Iterator to
Avoid NullPointerException with Stream.ofNullable in Java 9
This post demonstrates how to avoid NullPointerException in Java 9 when working with Stream and using the overloaded of metho
Group List items into Several Lists using Stream in Java 8
Group List items into Several Lists using Stream in Java 8 is easy. We have a list of Persons and we want to group them into Female, Male, Unknown list using Stream and Collectors in Java 8. PersonBean Below is
Java 8 Convert Stream Values to Map Entries Examples
This post demonstrates how to convert a stream of objects to a Map object using Collectors.toMap(…) methods.
Java 8 Convert values in a Stream using Map
Convert any value or object to a different type. For instance, MyEntityBean to MyEntityAPI. No loops. Just Lambda.
Java 8 Get the Min and Max values in a Stream
Do you remember your first programming assignment in college? Most like it is one of those simple Mathematics like get the min and max values from a given list. How about from a list of objects?