Posts

Showing posts with the label predicates

Functions, Method Reference and Predicates on Java 8

Image
Back to some cool stuff around java 8 and functional programming ideas arriving on the JVM with java lets see some other cool stuff around Lambda. You can define your functions with a java.util.function.Function interface that allow you to store lambdas in "objects" and receive and pass it trough methods, so this allow you do high order functions. So lets go down to the code and see some samples around this. There are some samples i coded here with streams, i will cover with more details on other posts.