In the previous post, we saw the Function Interface that takes an object of one type and transforms it into an object of another type. Consider the user case where we need to split a string and retain only the second half.
Search This Blog
Wednesday, 7 October 2015
Thursday, 24 September 2015
The Function Interface
I worked with using lambdas for Comparator interface in my first post on Lambdas. We saw how a Function interface could be used to convert an object of one type into an object of another.
Thursday, 3 September 2015
Thursday, 27 August 2015
Interfaces versus Abstract classes : pre and post Java 8
I have been given a contract to implement in Java. As a developer one of the early design decisions needed is, do I want an interface or an abstract class at the base of my hierarchy. This question is very popular in the Java world and often always pops up when doing low level design.
Tuesday, 25 August 2015
Suppliers in Java Lambda World
In the previous post I had a look at Consumer function objects and how they were used in the forEach method of the Iterable class. An exactly opposite kind of interface to the Consumer is the Supplier interface. (like the name doesn't give it away)
Subscribe to:
Posts (Atom)