Improve JavaDoc

Co-authored-by: Chen Liang <liach@openjdk.org>
This commit is contained in:
Tatsunori Uchino 2026-01-27 08:41:06 +09:00 committed by GitHub
parent 0e55e35c5a
commit 4744ee694e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 12 additions and 23 deletions

View File

@ -530,12 +530,7 @@ abstract sealed class AbstractStringBuilder implements Appendable, CharSequence
}
/**
* Returns the number of Unicode code points in
* this sequence. Unpaired surrogates count
* as one code point each.
*
* @return the number of Unicode code points in this String
* @since 26
* @since 27
*/
public int codePointCount() {
byte coder = this.coder;

View File

@ -254,12 +254,10 @@ public interface CharSequence {
}
/**
* Returns the number of Unicode code points in
* this sequence. Unpaired surrogates count
* as one code point each.
* {@return the number of Unicode code points in this character sequence}
* Unpaired surrogates count as one code point each.
*
* @return the number of Unicode code points in this sequence
* @since 26
* @since 27
*/
public default int codePointCount() {
final int length = length();

View File

@ -10000,14 +10000,12 @@ class Character implements java.io.Serializable, Comparable<Character>, Constabl
}
/**
* Returns the number of Unicode code points in the
* {@code char} array argument. Unpaired
* surrogates count as one code point each.
* {@return the number of Unicode code points in the {@code char} array}
* Unpaired surrogates count as one code point each.
*
* @param a the {@code char} array
* @return the number of Unicode code points in the char array
* @throws NullPointerException if {@code a} is null.
* @since 26
* @throws NullPointerException if {@code a} is null
* @since 27
*/
public static int codePointCount(char[] a) {
return codePointCountImpl(a, 0, a.length);

View File

@ -1715,12 +1715,10 @@ public final class String
}
/**
* Returns the number of Unicode code points in
* this {@code String}. Unpaired surrogates count
* as one code point each.
* {@return the number of Unicode code points in this String}
* Unpaired surrogates count as one code point each.
*
* @return the number of Unicode code points in this String
* @since 26
* @since 27
*/
public int codePointCount() {
if (isLatin1()) {

View File

@ -271,7 +271,7 @@ import jdk.internal.vm.annotation.IntrinsicCandidate;
}
/**
* @since 26
* @since 27
*/
@Override
public synchronized int codePointCount() {