|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList
org.antlr.stringtemplate.language.ArrayWrappedInList
public class ArrayWrappedInList
Turn an array into a List; subclass ArrayList for easy development, but it really doesn't use super stuff for anything. Ensure we create ArrayIterator for this List.
Field Summary | |
---|---|
protected java.lang.Object |
array
|
protected int |
n
Arrays are fixed size; precompute. |
Fields inherited from class java.util.AbstractList |
---|
modCount |
Constructor Summary | |
---|---|
ArrayWrappedInList(java.lang.Object array)
|
Method Summary | |
---|---|
java.lang.Object |
get(int i)
|
boolean |
isEmpty()
|
java.util.Iterator |
iterator()
|
int |
size()
|
java.lang.Object[] |
toArray()
|
Methods inherited from class java.util.ArrayList |
---|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, indexOf, lastIndexOf, remove, remove, removeRange, set, toArray, trimToSize |
Methods inherited from class java.util.AbstractList |
---|
equals, hashCode, listIterator, listIterator, subList |
Methods inherited from class java.util.AbstractCollection |
---|
containsAll, removeAll, retainAll, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
containsAll, equals, hashCode, listIterator, listIterator, removeAll, retainAll, subList |
Field Detail |
---|
protected java.lang.Object array
protected int n
Constructor Detail |
---|
public ArrayWrappedInList(java.lang.Object array)
Method Detail |
---|
public java.lang.Object get(int i)
get
in interface java.util.List
get
in class java.util.ArrayList
public int size()
size
in interface java.util.Collection
size
in interface java.util.List
size
in class java.util.ArrayList
public boolean isEmpty()
isEmpty
in interface java.util.Collection
isEmpty
in interface java.util.List
isEmpty
in class java.util.ArrayList
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection
toArray
in interface java.util.List
toArray
in class java.util.ArrayList
public java.util.Iterator iterator()
iterator
in interface java.lang.Iterable
iterator
in interface java.util.Collection
iterator
in interface java.util.List
iterator
in class java.util.AbstractList
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |