Creating A High Order Function From A BiFunction And Predicate In Java8

Knoldus

In this Blog we will be reading about creating a high order function from a bifunction and predicate in java8.Firstly a brief introduction to bifunction,predicate,high order function in java8

Predicate:Predicate in java 8 is used to apply a filter to a collection of objects.Predicate is a Functional interface and supports Lambda expressions. Separating Predicates that way makes them reusable and you can achieve separation of business layer and domain layer

BiFunction: BiFunction is a functional interface which can be used as the assignment target for a lambda expression or method reference. It represent an operation upon two operands of the same type,producing a result of the same type as the operands.

HighOrderFunction:These are functions that take other functions as parameters, or whose result is a function.

now we will see how to create a high order function from a bifunction and predicate

 public class CreateHighOrderFunction { private static…

View original post 256 more words

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s