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.Serializable
LazySet. 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>
delegate
The delegate setprivate static long
serialVersionUID
The serialVersionUID
-
Constructor Summary
Constructors Constructor Description LazySet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(T o)
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.Set<T>
createImplementation()
Create the set implementationboolean
isEmpty()
java.util.Iterator<T>
iterator()
boolean
remove(java.lang.Object o)
boolean
removeAll(java.util.Collection<?> c)
boolean
retainAll(java.util.Collection<?> c)
int
size()
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.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:
toString
in classjava.lang.Object
-
-