Support StringTemplate, ANTLR Project by making a donation! Terence often pays for things like the antlr.org server, conference travel, and this site design (that alone cost US$1000). Buy him a beer and pizza remotely ;)
|
ArrayWrappedInList
org.antlr.stringtemplate.language
Class ArrayWrappedInList
java.lang.Object
java.util.AbstractCollection
java.util.AbstractList
java.util.ArrayList
org.antlr.stringtemplate.language.ArrayWrappedInList
- All Implemented Interfaces:
- java.lang.Cloneable, java.util.Collection, java.util.List, java.util.RandomAccess, java.io.Serializable
- public class ArrayWrappedInList
- extends java.util.ArrayList
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.
- See Also:
- Serialized Form
|
Field Summary |
protected java.lang.Object |
array
|
protected int |
n
Arrays are fixed size; precompute. |
| Fields inherited from class java.util.AbstractList |
modCount |
| Methods inherited from class java.util.ArrayList |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, indexOf, lastIndexOf, 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, remove, 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, remove, removeAll, retainAll, subList |
array
protected java.lang.Object array
n
protected int n
- Arrays are fixed size; precompute.
ArrayWrappedInList
public ArrayWrappedInList(java.lang.Object array)
get
public java.lang.Object get(int i)
size
public int size()
isEmpty
public boolean isEmpty()
toArray
public java.lang.Object[] toArray()
iterator
public java.util.Iterator iterator()
|