Package org.jboss.util.collection
Class LazySet<T>
- java.lang.Object
-
- org.jboss.util.collection.LazySet<T>
-
- Type Parameters:
T- the element type
- All Implemented Interfaces:
java.io.Serializable,java.lang.Iterable<T>,java.util.Collection<T>,java.util.Set<T>
public class LazySet<T> extends java.lang.Object implements java.util.Set<T>, java.io.SerializableLazySet. 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.Set<T>delegateThe delegate setprivate static longserialVersionUIDThe serialVersionUID
-
Constructor Summary
Constructors Constructor Description LazySet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(T o)booleanaddAll(java.util.Collection<? extends T> c)voidclear()booleancontains(java.lang.Object o)booleancontainsAll(java.util.Collection<?> c)private java.util.Set<T>createImplementation()Create the set implementationbooleanisEmpty()java.util.Iterator<T>iterator()booleanremove(java.lang.Object o)booleanremoveAll(java.util.Collection<?> c)booleanretainAll(java.util.Collection<?> c)intsize()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.Set<T> delegate
The delegate set
-
-
Method Detail
-
createImplementation
private java.util.Set<T> createImplementation()
Create the set implementation- Returns:
- the set
-
add
public boolean add(T o)
-
addAll
public boolean addAll(java.util.Collection<? extends T> c)
-
clear
public void clear()
-
contains
public boolean contains(java.lang.Object o)
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
-
isEmpty
public boolean isEmpty()
-
iterator
public java.util.Iterator<T> iterator()
-
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()
-
toArray
public java.lang.Object[] toArray()
-
toArray
public <U> U[] toArray(U[] a)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-