mirror of
https://github.com/corda/corda.git
synced 2025-01-05 20:54:13 +00:00
add missing classpath methods
This commit is contained in:
parent
d1048f9bcb
commit
69f1024887
@ -2,7 +2,7 @@ package java.lang;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
public abstract class Enum<E extends Enum<E>> {
|
||||
public abstract class Enum<E extends Enum<E>> implements Comparable<E> {
|
||||
private final String name;
|
||||
private final int ordinal;
|
||||
|
||||
|
@ -42,6 +42,10 @@ public class Arrays {
|
||||
return array[index];
|
||||
}
|
||||
|
||||
public T set(int index, T value) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public <S> S[] toArray(S[] a) {
|
||||
return (S[])array;
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ public class LinkedList<T> implements List<T> {
|
||||
addFirst(element);
|
||||
} else {
|
||||
Cell<T> cell = find(index);
|
||||
Cell<T> newCell = new Cell<T>(element, cell.prev, cell);
|
||||
Cell<T> newCell = new Cell(element, cell.prev, cell);
|
||||
cell.prev.next = newCell;
|
||||
}
|
||||
}
|
||||
@ -131,6 +131,13 @@ public class LinkedList<T> implements List<T> {
|
||||
return find(index).value;
|
||||
}
|
||||
|
||||
public T set(int index, T value) {
|
||||
Cell<T> c = find(index);
|
||||
T old = c.value;
|
||||
c.value = value;
|
||||
return old;
|
||||
}
|
||||
|
||||
public T getFirst() {
|
||||
if (front != null) {
|
||||
return front.value;
|
||||
|
@ -3,6 +3,8 @@ package java.util;
|
||||
public interface List<T> extends Collection<T> {
|
||||
public T get(int index);
|
||||
|
||||
public T set(int index, T value);
|
||||
|
||||
public T remove(int index);
|
||||
|
||||
public boolean add(T element);
|
||||
|
@ -42,6 +42,10 @@ public class Vector<T> implements List<T> {
|
||||
return list.get(index);
|
||||
}
|
||||
|
||||
public synchronized T set(int index, T value) {
|
||||
return list.set(index, value);
|
||||
}
|
||||
|
||||
public T elementAt(int index) {
|
||||
return get(index);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user