Java Reference
In-Depth Information
Lambda's Domain in Review
Java 8 provides a new abstraction: you can now abstract away the concept of processing a domain. You begin
with a stream, and whether that value is coming from a map, a collection, or somewhere else, the resulting
processing code is exactly the same. You can now get away from the logic of iterating over your source, and
focus on what you want to do with the elements that it provides. As we have seen in this chapter, streams
are this abstraction. In addition, there are some convenient shorthand methods. These shorthand methods
are especially useful for converting legacy code to a more functional style. In the next chapter, we will look
at how to handle data sources that are outside of our applications: interacting with the outside world makes
these functional structures more complicated. This complication will actually show the power of functional
programming to deal with awkward code and let you focus on the attention.
 
Search WWH ::




Custom Search