mirror of
https://github.com/corda/corda.git
synced 2025-06-13 04:38:19 +00:00
implement a few more classpath methods, including Collection.addAll and Collection.toArray
This commit is contained in:
@ -21,6 +21,14 @@ public class Arrays {
|
||||
return (a == null && b == null) || (a != null && a.equals(b));
|
||||
}
|
||||
|
||||
public static void sort(Object[] array) {
|
||||
sort(array, new Comparator() {
|
||||
public int compare(Object a, Object b) {
|
||||
return ((Comparable) a).compareTo(b);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static <T> void sort(T[] array, Comparator<? super T> comparator) {
|
||||
// insertion sort
|
||||
for (int j = 1; j < array.length; ++j) {
|
||||
@ -48,6 +56,10 @@ public class Arrays {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public boolean addAll(Collection<? extends T> collection) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public void add(int index, T element) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
Reference in New Issue
Block a user