Factory methods have been added to the Collections class for simplifying map creation.
Unresolved directive in <stdin> - include::../../../../../../../../src/main/java/nine/api/ImmutableMapFactory.java[tag=immutableEmptyMapJava8]
Unresolved directive in <stdin> - include::../../../../../../../../src/main/java/nine/api/ImmutableMapFactory.java[tag=immutableEmptyMapJava9]
Unresolved directive in <stdin> - include::../../../../../../../../src/main/java/nine/api/ImmutableMapFactory.java[tag=immutableMapJava8]
Factory methods have been added to the Collections class for simplifying set creation.
Unresolved directive in <stdin> - include::../../../../../../../../src/main/java/nine/api/ImmutableSetFactory.java[tag=immutableEmptySetJava8]
Unresolved directive in <stdin> - include::../../../../../../../../src/main/java/nine/api/ImmutableSetFactory.java[tag=immutableEmptySetJava9]
Unresolved directive in <stdin> - include::../../../../../../../../src/main/java/nine/api/ImmutableSetFactory.java[tag=immutableSetJava8]
With Matcher.results
we get a stream of all matched elements
Unresolved directive in <stdin> - include::../../../../../../../../src/main/java/nine/api/MatcherApi.java[tag=results]
With Matcher.replaceAll
we can perform substitution of matches.
Unresolved directive in <stdin> - include::../../../../../../../../src/main/java/nine/api/MatcherApi.java[tag=replaceAll]
Methods for convenient null
checking have been added to Objects
class.
Unresolved directive in <stdin> - include::../../../../../../../../src/main/java/nine/api/ObjectsApi.java[tag=requireNonNullElse]
Unresolved directive in <stdin> - include::../../../../../../../../src/main/java/nine/api/ObjectsApi.java[tag=requireNonNullElseGet]
Unresolved directive in <stdin> - include::../../../../../../../../src/main/java/nine/api/OptionalApi.java[tag=optionalOr]
Unresolved directive in <stdin> - include::../../../../../../../../src/main/java/nine/api/OptionalApi.java[tag=optionalIfPresentOrElse]
Unresolved directive in <stdin> - include::../../../../../../../../src/main/java/nine/api/OptionalApi.java[tag=optionalStream]
The following describes selected improvements of the Java API. See the Java 9 release notes.
Unresolved directive in <stdin> - include::ObjectsApi.adoc[leveloffset=+1] Unresolved directive in <stdin> - include::ImmutableListFactory.adoc[leveloffset=+1] Unresolved directive in <stdin> - include::ImmutableMapEntryFactory.adoc[leveloffset=+1] Unresolved directive in <stdin> - include::OptionalApi.adoc[leveloffset=+1] Unresolved directive in <stdin> - include::CollectorsApi.adoc[leveloffset=+1] Unresolved directive in <stdin> - include::ImmutableSetFactory.adoc[leveloffset=+1] Unresolved directive in <stdin> - include::ImmutableMapFactory.adoc[leveloffset=+1] Unresolved directive in <stdin> - include::MatcherApi.adoc[leveloffset=+1] Unresolved directive in <stdin> - include::StreamApi.adoc[leveloffset=+1]
Unresolved directive in <stdin> - include::../../../../../../../../src/main/java/nine/api/StreamApi.java[tag=takeWhile]
We can take (accept) stream elements matching a predicate.
Unresolved directive in <stdin> - include::../../../../../../../../src/main/java/nine/api/StreamApi.java[tag=dropWhile]
We can drop stream elements matching a predicate.
Unresolved directive in <stdin> - include::../../../../../../../../src/main/java/nine/api/StreamApi.java[tag=iterate]
Generate a stream using an iteration.