mirror of
https://github.com/corda/corda.git
synced 2025-01-21 03:55:00 +00:00
implement a few methods to make SWT 3.4 happy
This commit is contained in:
parent
f423d39b25
commit
96d7bf571d
@ -93,6 +93,11 @@ public class StringBuffer implements CharSequence {
|
||||
return this;
|
||||
}
|
||||
|
||||
public synchronized StringBuffer insert(int i, int v) {
|
||||
sb.insert(i, v);
|
||||
return this;
|
||||
}
|
||||
|
||||
public synchronized StringBuffer delete(int start, int end) {
|
||||
sb.delete(start, end);
|
||||
return this;
|
||||
|
@ -154,6 +154,10 @@ public class StringBuilder implements CharSequence {
|
||||
return insert(i, new String(new char[] { c }, 0, 1, false));
|
||||
}
|
||||
|
||||
public StringBuilder insert(int i, int v) {
|
||||
return insert(i, String.valueOf(v));
|
||||
}
|
||||
|
||||
public StringBuilder delete(int start, int end) {
|
||||
if (start >= end) {
|
||||
return this;
|
||||
|
@ -45,6 +45,12 @@ public abstract class Calendar {
|
||||
fields[field] = value;
|
||||
}
|
||||
|
||||
public void set(int year, int month, int date) {
|
||||
set(YEAR, year);
|
||||
set(MONTH, month);
|
||||
set(DAY_OF_MONTH, date);
|
||||
}
|
||||
|
||||
public void setTime(Date date) {
|
||||
time = date.getTime();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user