February 2014
Beginner
1248 pages
62h 25m
English
• To reuse a lambda, you can assign it to a variable of the appropriate functional interface type.
• The Comparator interface’s static method comparing (p. 753) receives a Function that’s used to extract a value from an object in the stream for use in comparisons and returns a Comparator object.
• A nice performance feature of lazy evaluation is the ability to perform short circuit evaluation—that is, to stop processing the stream pipeline as soon as the desired result is available.
• Stream method findFirst is a short-circuiting terminal operation that processes the stream pipeline and terminates processing as soon as the first object from the stream pipeline is found. The ...
Read now
Unlock full access