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.
 
Constructor Summary
AltFilterSet(Set root)
          Creates a new AltFilterSet.
 
Method Summary
 boolean add(Object o)
           
 boolean contains(Object o)
           
 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.
 boolean remove(Object o)
           
 int size()
           
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
addAll, clear, containsAll, isEmpty, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
addAll, clear, containsAll, isEmpty, retainAll, toArray, toArray
 

Field Detail

root

protected Set root
The backing set.
Constructor Detail

AltFilterSet

public AltFilterSet(Set root)
Creates a new AltFilterSet.
Parameters:
root - The backing set to use.
Method Detail

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