gausssoft.collections
Class AltFilterSet
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractSet
|
+--gausssoft.collections.AltFilterSet
- All Implemented Interfaces:
- Collection, Serializable, Set
- public class AltFilterSet
- extends AbstractSet
- implements Serializable
The AltFilterSet
wraps around another Set
object providing the same functionality as AbstractSet
.
See the AltFilterCollection
class for a description why the
AltFilter
classes exist.
This object is only serializable if the backing set is serializable.
All methods which override the subclass implementations simply call the method of the
same name in the backing set.
- Author:
- Allan Crooks
- See Also:
Set
,
AbstractSet
,
FilterSet
,
AltFilterCollection
,
AltFilterList
,
AltFilterIterator
, Serialized Form
Field Summary |
protected Set |
root
The backing set. |
root
protected Set root
- The backing set.
AltFilterSet
public AltFilterSet(Set root)
- Creates a new AltFilterSet.
- Parameters:
root
- The backing set to use.
iterator
public Iterator iterator()
- Returns a
AltFilterIterator
object, using this object as the filtering
object and using an iterator from the backing collection as the backing iterator.
- Overrides:
iterator
in class AbstractCollection
- Returns:
- An iterator for this collection.
size
public int size()
- Overrides:
size
in class AbstractCollection
add
public boolean add(Object o)
- Overrides:
add
in class AbstractCollection
contains
public boolean contains(Object o)
- Overrides:
contains
in class AbstractCollection
remove
public boolean remove(Object o)
- Overrides:
remove
in class AbstractCollection