Martin Ahrer

Thinking outside the box

0001-01-01 1 min read
Lines
Unresolved directive in <stdin> - include::../../../../../../../../src/main/java/eleven/api/StringApi.java[tag=lines]

With String::lines we can split any multi line String into a stream of lines.

Strip
Unresolved directive in <stdin> - include::../../../../../../../../src/main/java/eleven/api/StringApi.java[tag=strip]

String::strip is similar to String::trim but with Unicode support. String also has a stripLeading and stripTrailing method.

Continue reading

0001-01-01 1 min read
Lambda variable without type with {java10}
Unresolved directive in <stdin> - include::../../../../../../../../src/main/java/eleven/lang/LambdaLocalVariable.java[tag=beforeJava11]
Lambda variable with type with {java10}
Unresolved directive in <stdin> - include::../../../../../../../../src/main/java/eleven/lang/LambdaLocalVariable.java[tag=withTypeBeforeJava11]

The type is inferred from the initializer.

With multiple lambda variables we have to use var for all or none. Also it is not possible to mix var with explicit types.

Continue reading

0001-01-01 1 min read

The following describes selected improvements of the Java language. See the Java 10 release notes.

Unresolved directive in <stdin> - include::LambdaLocalVariable.adoc[leveloffset=+1]

0001-01-01 1 min read
Is Empty
Unresolved directive in <stdin> - include::../../../../../../../../src/main/java/fifteen/api/CharSequenceApi.java[tag=isEmpty]

0001-01-01 1 min read

The following describes selected improvements of the Java API. See the Java 15 release notes.

Unresolved directive in <stdin> - include::CharSequenceApi.adoc[leveloffset=+1]

0001-01-01 1 min read

The following describes selected improvements of the Java language. See the Java 15 release notes.

With JEP 378, Text Blocks introduced in Java 13 are now moving from preview state to general availability.

Java 15 is introducing the following language enhancements as developer preview.

Continue reading

0001-01-01 1 min read
Multiline Text Block
Unresolved directive in <stdin> - include::../../../../../../../../src/main/java/fifteen/lang/TextBlock.java[tag=multilineTextBlock]
Older posts Newer posts