mirror of
https://github.com/corda/corda.git
synced 2025-01-22 12:28:11 +00:00
add a few classpath methods
This commit is contained in:
parent
76d876c039
commit
4611c89dbe
@ -1,5 +1,7 @@
|
|||||||
package java.lang;
|
package java.lang;
|
||||||
|
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
|
||||||
public final class String implements Comparable<String> {
|
public final class String implements Comparable<String> {
|
||||||
private Object data;
|
private Object data;
|
||||||
private int offset;
|
private int offset;
|
||||||
@ -30,6 +32,15 @@ public final class String implements Comparable<String> {
|
|||||||
this(data, 0, data.length);
|
this(data, 0, data.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String(byte[] data, String charset)
|
||||||
|
throws UnsupportedEncodingException
|
||||||
|
{
|
||||||
|
this(data);
|
||||||
|
if (! charset.equals("US-ASCII")) {
|
||||||
|
throw new UnsupportedEncodingException(charset);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private String(Object data, int offset, int length, boolean copy) {
|
private String(Object data, int offset, int length, boolean copy) {
|
||||||
int l;
|
int l;
|
||||||
if (data instanceof char[]) {
|
if (data instanceof char[]) {
|
||||||
|
@ -29,6 +29,10 @@ public class Thread implements Runnable {
|
|||||||
classLoader = current.classLoader;
|
classLoader = current.classLoader;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Thread(Runnable task, String name) {
|
||||||
|
this(task);
|
||||||
|
}
|
||||||
|
|
||||||
public synchronized void start() {
|
public synchronized void start() {
|
||||||
if (peer != 0) {
|
if (peer != 0) {
|
||||||
throw new IllegalStateException("thread already started");
|
throw new IllegalStateException("thread already started");
|
||||||
|
@ -3,6 +3,8 @@ package java.util;
|
|||||||
public interface Collection<T> extends Iterable<T> {
|
public interface Collection<T> extends Iterable<T> {
|
||||||
public int size();
|
public int size();
|
||||||
|
|
||||||
|
public boolean isEmpty();
|
||||||
|
|
||||||
public boolean contains(T element);
|
public boolean contains(T element);
|
||||||
|
|
||||||
public boolean add(T element);
|
public boolean add(T element);
|
||||||
|
Loading…
Reference in New Issue
Block a user