net.i2p.util
Class CachedIteratorArrayList<E>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<E>
              extended by net.i2p.util.CachedIteratorArrayList<E>
All Implemented Interfaces:
Serializable, Cloneable, Iterable<E>, Collection<E>, List<E>, RandomAccess

public class CachedIteratorArrayList<E>
extends ArrayList<E>

ArrayList that uses a single iterator. Useful to avoid object churn while keeping the conveniences of an iterator.

Since:
0.9.4
Author:
zab
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
CachedIteratorArrayList()
           
CachedIteratorArrayList(Collection<? extends E> c)
           
CachedIteratorArrayList(int initialCapacity)
           
 
Method Summary
 Iterator<E> iterator()
           
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeRange, retainAll, set, size, subList, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode
 
Methods inherited from class java.util.AbstractCollection
containsAll, 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
 

Constructor Detail

CachedIteratorArrayList

public CachedIteratorArrayList()

CachedIteratorArrayList

public CachedIteratorArrayList(Collection<? extends E> c)

CachedIteratorArrayList

public CachedIteratorArrayList(int initialCapacity)
Method Detail

iterator

public Iterator<E> iterator()
Specified by:
iterator in interface Iterable<E>
Specified by:
iterator in interface Collection<E>
Specified by:
iterator in interface List<E>
Overrides:
iterator in class ArrayList<E>