|
|||||||||
| 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.Listget in class java.util.ArrayListpublic int size()
size in interface java.util.Collectionsize in interface java.util.Listsize in class java.util.ArrayListpublic boolean isEmpty()
isEmpty in interface java.util.CollectionisEmpty in interface java.util.ListisEmpty in class java.util.ArrayListpublic java.lang.Object[] toArray()
toArray in interface java.util.CollectiontoArray in interface java.util.ListtoArray in class java.util.ArrayListpublic java.util.Iterator iterator()
iterator in interface java.lang.Iterableiterator in interface java.util.Collectioniterator in interface java.util.Listiterator in class java.util.AbstractList
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||