Class ArrayWrappedInList
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList
-
- org.antlr.stringtemplate.language.ArrayWrappedInList
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.lang.Iterable,java.util.Collection,java.util.List,java.util.RandomAccess
public class ArrayWrappedInList extends java.util.ArrayListTurn 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
-
-
Constructor Summary
Constructors Constructor Description ArrayWrappedInList(java.lang.Object array)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectget(int i)booleanisEmpty()java.util.Iteratoriterator()intsize()java.lang.Object[]toArray()-
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, hashCode, indexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, sort, spliterator, subList, toArray, trimToSize
-
-
-
-
Method Detail
-
get
public java.lang.Object get(int i)
- Specified by:
getin interfacejava.util.List- Overrides:
getin classjava.util.ArrayList
-
size
public int size()
- Specified by:
sizein interfacejava.util.Collection- Specified by:
sizein interfacejava.util.List- Overrides:
sizein classjava.util.ArrayList
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfacejava.util.Collection- Specified by:
isEmptyin interfacejava.util.List- Overrides:
isEmptyin classjava.util.ArrayList
-
toArray
public java.lang.Object[] toArray()
- Specified by:
toArrayin interfacejava.util.Collection- Specified by:
toArrayin interfacejava.util.List- Overrides:
toArrayin classjava.util.ArrayList
-
iterator
public java.util.Iterator iterator()
- Specified by:
iteratorin interfacejava.util.Collection- Specified by:
iteratorin interfacejava.lang.Iterable- Specified by:
iteratorin interfacejava.util.List- Overrides:
iteratorin classjava.util.ArrayList
-
-