mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8302323: Add repeat methods to StringBuilder/StringBuffer
Reviewed-by: tvaleev, redestad
This commit is contained in:
parent
dd7ca757a7
commit
9b9b5a7a5c
6 changed files with 571 additions and 5 deletions
|
@ -708,6 +708,28 @@ import jdk.internal.vm.annotation.IntrinsicCandidate;
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws IllegalArgumentException {@inheritDoc}
|
||||
*
|
||||
* @since 21
|
||||
*/
|
||||
@Override
|
||||
public synchronized StringBuffer repeat(int codePoint, int count) {
|
||||
super.repeat(codePoint, count);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws IllegalArgumentException {@inheritDoc}
|
||||
*
|
||||
* @since 21
|
||||
*/
|
||||
@Override
|
||||
public synchronized StringBuffer repeat(CharSequence cs, int count) {
|
||||
super.repeat(cs, count);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
@IntrinsicCandidate
|
||||
public synchronized String toString() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue