There I go babbling about new stream methods and then I forget one: a Stream::iterate overload that produces a finite stream.
More about Java 9 – this time: Optional. We’ll see how the new methods ‘stream()’, ‘or()’, and ‘ifPresentOrElse()’ considerably improve its API.
Java 9 is coming! And it is more than just Jigsaw. One of the many changes are new Stream methods: ‘takeWhile’, ‘dropWhile’, and ‘ofNullable’. For more fun with streams!
Hand in hand with a class’s definition of equality goes a matching implementation of hashCode. Again, there are a couple of things to be considered to get it right. Let’s check ’em out!
A fundamental aspect of any Java class is its definition of equality. It is determined by a class’s equals method and there are a couple of things to be considered for a correct implementation. Let’s check ’em out so we get it right!
In Java 9 a module must read another to be able to use its API. With implied readability a third module passes the dependency on, allowing the first to read the second without explicitly depending on it.
When using Stream.findFirst() or findAny(), you will often assume that there is at most one element left in the stream. But neither tests that assumption so maybe you should use a different approach.
A Jigsaw tutorial explaining how to create modules, state dependencies between them, and use the module system as a service locator to decouple modules.
Mark Reinhold proposed a six-month delay of JSR 376 / Project Jigsaw and thus of the Java 9 release. According to this JDK 9 would come out in March 2017.
JavaOne 2015 saw a series of talks by the Project Jigsaw team about modularity in Java 9. This one gives a peek under the hood discussing layers and class loaders.