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.Serializable
LazyList. 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>
delegate
The delegate listprivate static long
serialVersionUID
The serialVersionUID
-
Constructor Summary
Constructors Constructor Description LazyList()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int index, T element)
boolean
add(T o)
boolean
addAll(int index, java.util.Collection<? extends T> c)
boolean
addAll(java.util.Collection<? extends T> c)
void
clear()
boolean
contains(java.lang.Object o)
boolean
containsAll(java.util.Collection<?> c)
private java.util.List<T>
createImplementation()
Create the list implementationT
get(int index)
int
indexOf(java.lang.Object o)
boolean
isEmpty()
java.util.Iterator<T>
iterator()
int
lastIndexOf(java.lang.Object o)
java.util.ListIterator<T>
listIterator()
java.util.ListIterator<T>
listIterator(int index)
T
remove(int index)
boolean
remove(java.lang.Object o)
boolean
removeAll(java.util.Collection<?> c)
boolean
retainAll(java.util.Collection<?> c)
T
set(int index, T element)
int
size()
java.util.List<T>
subList(int fromIndex, int toIndex)
java.lang.Object[]
toArray()
<U> U[]
toArray(U[] a)
java.lang.String
toString()
-
-
-
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:
addAll
in 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:
indexOf
in 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:
lastIndexOf
in interfacejava.util.List<T>
-
listIterator
public java.util.ListIterator<T> listIterator()
- Specified by:
listIterator
in interfacejava.util.List<T>
-
listIterator
public java.util.ListIterator<T> listIterator(int index)
- Specified by:
listIterator
in 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:
subList
in interfacejava.util.List<T>
-
toArray
public java.lang.Object[] toArray()
-
toArray
public <U> U[] toArray(U[] a)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-