mirror of
https://github.com/corda/corda.git
synced 2025-01-03 19:54:13 +00:00
Merge pull request #233 from jentfoo/RandomAccess_implements
Small change to make these two structures implement RandomAccess
This commit is contained in:
commit
a6f0923678
@ -14,7 +14,7 @@ import java.io.IOException;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
|
||||
public class ArrayList<T> extends AbstractList<T> implements java.io.Serializable {
|
||||
public class ArrayList<T> extends AbstractList<T> implements java.io.Serializable, RandomAccess {
|
||||
private static final int MinimumCapacity = 16;
|
||||
|
||||
private Object[] array;
|
||||
|
@ -11,4 +11,6 @@
|
||||
package java.util;
|
||||
|
||||
public interface RandomAccess {
|
||||
/* nothing added here, this interface just indicates a
|
||||
* structure is efficient to access via index's directly.*/
|
||||
}
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
package java.util;
|
||||
|
||||
public class Vector<T> extends AbstractList<T> implements java.io.Serializable, Cloneable {
|
||||
public class Vector<T> extends AbstractList<T> implements java.io.Serializable, Cloneable, RandomAccess {
|
||||
private final ArrayList<T> list;
|
||||
|
||||
public Vector(int capacity) {
|
||||
|
Loading…
Reference in New Issue
Block a user