LoginSignup
0
4

More than 5 years have passed since last update.

Javadocでは<P>タグの閉じタグを書かないのが主流?

Last updated at Posted at 2017-04-07

    /**
     * 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 でリッチに書けますが、マークアップすればするほどコーダーが読みづらくなるというのがジレンマでした。

この書き方はスッキリしていて良いなと思いました。
個人的に目から鱗だったので、最近のマイブームです。

0
4
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
4