Package org.jboss.util.collection
Class LazyList<T>
- java.lang.Object
-
- org.jboss.util.collection.LazyList<T>
-
- Type Parameters:
T- the collection type
- All Implemented Interfaces:
java.io.Serializable,java.lang.Iterable<T>,java.util.Collection<T>,java.util.List<T>
public class LazyList<T> extends java.lang.Object implements java.util.List<T>, java.io.SerializableLazyList. It's serializable if the elements are serializable.- Version:
- $Revision$
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<T>delegateThe delegate listprivate static longserialVersionUIDThe serialVersionUID
-
Constructor Summary
Constructors Constructor Description LazyList()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, T element)booleanadd(T o)booleanaddAll(int index, java.util.Collection<? extends T> c)booleanaddAll(java.util.Collection<? extends T> c)voidclear()booleancontains(java.lang.Object o)booleancontainsAll(java.util.Collection<?> c)private java.util.List<T>createImplementation()Create the list implementationTget(int index)intindexOf(java.lang.Object o)booleanisEmpty()java.util.Iterator<T>iterator()intlastIndexOf(java.lang.Object o)java.util.ListIterator<T>listIterator()java.util.ListIterator<T>listIterator(int index)Tremove(int index)booleanremove(java.lang.Object o)booleanremoveAll(java.util.Collection<?> c)booleanretainAll(java.util.Collection<?> c)Tset(int index, T element)intsize()java.util.List<T>subList(int fromIndex, int toIndex)java.lang.Object[]toArray()<U> U[]toArray(U[] a)java.lang.StringtoString()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
The serialVersionUID- See Also:
- Constant Field Values
-
delegate
private java.util.List<T> delegate
The delegate list
-
-
Method Detail
-
createImplementation
private java.util.List<T> createImplementation()
Create the list implementation- Returns:
- the list
-
add
public boolean add(T o)
-
addAll
public boolean addAll(java.util.Collection<? extends T> c)
-
addAll
public boolean addAll(int index, java.util.Collection<? extends T> c)- Specified by:
addAllin interfacejava.util.List<T>
-
clear
public void clear()
-
contains
public boolean contains(java.lang.Object o)
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
-
indexOf
public int indexOf(java.lang.Object o)
- Specified by:
indexOfin interfacejava.util.List<T>
-
isEmpty
public boolean isEmpty()
-
iterator
public java.util.Iterator<T> iterator()
-
lastIndexOf
public int lastIndexOf(java.lang.Object o)
- Specified by:
lastIndexOfin interfacejava.util.List<T>
-
listIterator
public java.util.ListIterator<T> listIterator()
- Specified by:
listIteratorin interfacejava.util.List<T>
-
listIterator
public java.util.ListIterator<T> listIterator(int index)
- Specified by:
listIteratorin interfacejava.util.List<T>
-
remove
public boolean remove(java.lang.Object o)
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
-
size
public int size()
-
subList
public java.util.List<T> subList(int fromIndex, int toIndex)
- Specified by:
subListin interfacejava.util.List<T>
-
toArray
public java.lang.Object[] toArray()
-
toArray
public <U> U[] toArray(U[] a)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-