/**
* Returns a stream consisting of the elements of this stream, sorted
* according to natural order. If the elements of this stream are not
* {@code Comparable}, a {@code java.lang.ClassCastException} may be thrown
* when the terminal operation is executed.
*
* <p>For ordered streams, the sort is stable. For unordered streams, no
* stability guarantees are made.
*
* <p>This is a <a href="package-summary.html#StreamOps">stateful
* intermediate operation</a>.
*
* @return the new stream
*/
Stream<T> sorted();
java.util.stream.Stream#sorted()
のコードですが、着目したいのは Javadoc です。
Javadoc をぼーっと眺めていて気がついたのですが、<P> タグの閉じタグを書いてないんですよね。
Javadoc は HTML でリッチに書けますが、マークアップすればするほどコーダーが読みづらくなるというのがジレンマでした。
この書き方はスッキリしていて良いなと思いました。
個人的に目から鱗だったので、最近のマイブームです。