mirror of
https://github.com/corda/corda.git
synced 2025-06-13 04:38:19 +00:00
add classes and methods needed for GNU Classpath compatibility
Most of these methods are stubs which throw UnsupportedOperationExceptions for now.
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
|
||||
package java.lang;
|
||||
|
||||
public class StringBuilder implements CharSequence {
|
||||
public class StringBuilder implements CharSequence, Appendable {
|
||||
private static final int BufferSize = 32;
|
||||
|
||||
private Cell chain;
|
||||
@ -54,6 +54,14 @@ public class StringBuilder implements CharSequence {
|
||||
}
|
||||
}
|
||||
|
||||
public StringBuilder append(CharSequence sequence) {
|
||||
return append(sequence.toString());
|
||||
}
|
||||
|
||||
public Appendable append(CharSequence sequence, int start, int end) {
|
||||
return append(sequence.subSequence(start, end));
|
||||
}
|
||||
|
||||
public StringBuilder append(char[] b, int offset, int length) {
|
||||
return append(new String(b, offset, length));
|
||||
}
|
||||
@ -150,6 +158,10 @@ public class StringBuilder implements CharSequence {
|
||||
return this;
|
||||
}
|
||||
|
||||
public StringBuilder insert(int i, CharSequence s) {
|
||||
return insert(i, s.toString());
|
||||
}
|
||||
|
||||
public StringBuilder insert(int i, char c) {
|
||||
return insert(i, new String(new char[] { c }, 0, 1, false));
|
||||
}
|
||||
@ -332,4 +344,8 @@ public class StringBuilder implements CharSequence {
|
||||
deleteCharAt(index);
|
||||
insert(index, ch);
|
||||
}
|
||||
|
||||
public void ensureCapacity(int capacity) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user