The following aspects of java 8 enhancements are covered in the examples of the project
- The use of default keyword in interfaces to implements method bodies that an implementing class may choose not to implement. One important aspect of it is providing forward (and not backward) compatibility of legacy code with java 8
- The use of the :: operator in filtering arrays and collections datas
- The use of lambdas expressions in various cases (such as sorting an array with Arrays.sort method
- the use of generic predicates as function value parameters allowing a value reference to boolean functions
- the use of the java 8 Stream object along with its filter and collect method
- Aggregating filtered datas from a stream with the use of Collectors.groupingBy method
- Using ParrallelStream
- Using Optional to reduce NullPointerExceptions
- Using pattern matching
- Passing code with behaviour parameterization (Done!!!)
-
Deep diving into lambda expressions
- Deep diving into functional interfaces (Done!!!)
- An early look at the execute around pattern (Done!!!)
- More functional interfaces (Done!!!)
- Consumer interface
- Function interface
- Predicate interface
- Type checking (see an illustration here)(Done!!!)
- Type inference(Done!!!)
- Method refrence(Done!!!)
- Constructor refrence (some examples using BiFunction and BePredicate) (Done!!!)
</span>
- Deep diving into streams
- Deep diving into parrallel data processing and the performance impact
- more soon...
- Java 8 interfaces and default methods
- Core lambda concepts illustrations
- Taking advantage of Optional type
- Core streams concepts
- Custom usage of collect method (without implementing the Collector interface)
- Streams based filtering technics
- Grouping technics
- Joining demo
- Matching examples
- Parallel stream, spliterator, forkjoin
- Primitive streams, range and rangeClosed
- Mapping and reducing
- Refactoring classic code and design patterns
- Using Optional types in a stream fashion
- Usage of method reference
- Various illustrations of functional interfaces usage
- Illustrating constructor reference
- Asynchronous streaming
Esko Luontola build a great tool he called retrolambda. It allows you to compile your java 8 sources to a java 1.7 jvm and even older versions. This is great because a lot of customers won't migrate so easily to java 8: I am particularly thinking about banks, insurance companies, etc. Thanks to retro lambda you can still use the amazing features of java 8 such as lambda and delivers an app that runs on java 1.7 or 1.6. You can find more about retrolambda here