gausssoft.collections
Class FilterSet
java.lang.Object
|
+--gausssoft.collections.FilterSet
- All Implemented Interfaces:
- Collection, Serializable, Set
- public class FilterSet
- extends Object
- implements Set, Serializable
The FilterSet class contains another Set, which it uses as it's basic source of data, possibly
transforming the data along the way or providing additional functionality.
Each method in this implementation calls the method with the same signature in the backing
set.
This class can only be serialized if the backing set is serializable.
- Author:
- Allan Crooks
- See Also:
Set, Serialized Form
|
Field Summary |
protected Set |
root
The backing set. |
|
Constructor Summary |
FilterSet(Set root)
Creates a new FilterSet. |
root
protected Set root
- The backing set.
FilterSet
public FilterSet(Set root)
- Creates a new FilterSet.
- Parameters:
root - The set to wrap this FilterSet around.- Throws:
NullPointerException - set is null.
size
public int size()
- Specified by:
size in interface Set
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty in interface Set
contains
public boolean contains(Object o)
- Specified by:
contains in interface Set
iterator
public Iterator iterator()
- Specified by:
iterator in interface Set
toArray
public Object[] toArray()
- Specified by:
toArray in interface Set
toArray
public Object[] toArray(Object[] a)
- Specified by:
toArray in interface Set
add
public boolean add(Object o)
- Specified by:
add in interface Set
remove
public boolean remove(Object o)
- Specified by:
remove in interface Set
containsAll
public boolean containsAll(Collection c)
- Specified by:
containsAll in interface Set
addAll
public boolean addAll(Collection c)
- Specified by:
addAll in interface Set
removeAll
public boolean removeAll(Collection c)
- Specified by:
removeAll in interface Set
retainAll
public boolean retainAll(Collection c)
- Specified by:
retainAll in interface Set
clear
public void clear()
- Specified by:
clear in interface Set
equals
public boolean equals(Object o)
- Specified by:
equals in interface Set- Overrides:
equals in class Object
hashCode
public int hashCode()
- Specified by:
hashCode in interface Set- Overrides:
hashCode in class Object
toString
public String toString()
- Overrides:
toString in class Object