mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
8215401: Add isEmpty default method to CharSequence
Reviewed-by: jlaskey, rriggs, jjg, alanb, smarks, darcy
This commit is contained in:
parent
7d330d34f1
commit
113c48f5da
4 changed files with 133 additions and 1 deletions
|
@ -1645,6 +1645,18 @@ public abstract class $Type$Buffer
|
|||
return remaining();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns {@code true} if this character buffer is empty.
|
||||
*
|
||||
* @return {@code true} if there are {@code 0} remaining characters,
|
||||
* otherwise {@code false}
|
||||
*
|
||||
* @since 15
|
||||
*/
|
||||
public final boolean isEmpty() {
|
||||
return remaining() == 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads the character at the given index relative to the current
|
||||
* position.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue