edu.rice.cs.plt.collect
Class DelegatingSet<T>

java.lang.Object
  extended by java.util.AbstractCollection<T>
      extended by edu.rice.cs.plt.collect.DelegatingCollection<T>
          extended by edu.rice.cs.plt.collect.DelegatingSet<T>
All Implemented Interfaces:
PredicateSet<T>, SizedIterable<T>, Predicate<java.lang.Object>, Composite, java.io.Serializable, java.lang.Iterable<T>, java.util.Collection<T>, java.util.Set<T>
Direct Known Subclasses:
DelegatingRelation, ListenerSet, SnapshotSynchronizedSet

public class DelegatingSet<T>
extends DelegatingCollection<T>
implements PredicateSet<T>

An implementation of PredicateSet that delegates all operations to a wrapped set. Subclasses can be defined that override a few of the methods, while maintaining the default delegation behavior in most cases. Subclasses can also invoke the overridden methods in AbstractCollection to use the default implementations there by invoking, for example, DelegatingCollection.abstractCollectionAddAll(java.util.Collection) (see AbstractCollection for details on the default implementations).

See Also:
Serialized Form

Field Summary
 
Fields inherited from class edu.rice.cs.plt.collect.DelegatingCollection
_delegate
 
Constructor Summary
DelegatingSet(java.util.Set<T> delegate)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 
Methods inherited from class edu.rice.cs.plt.collect.DelegatingCollection
abstractCollectionAddAll, abstractCollectionClear, abstractCollectionContains, abstractCollectionContainsAll, abstractCollectionIsEmpty, abstractCollectionRemove, abstractCollectionRemoveAll, abstractCollectionRetainAll, abstractCollectionToArray, abstractCollectionToArray, add, addAll, clear, compositeHeight, compositeSize, contains, containsAll, hasFixedSize, isEmpty, isInfinite, isStatic, iterator, remove, removeAll, retainAll, size, size, 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
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from interface edu.rice.cs.plt.lambda.Predicate
contains
 
Methods inherited from interface edu.rice.cs.plt.iter.SizedIterable
hasFixedSize, isEmpty, isInfinite, isStatic, size, size
 

Constructor Detail

DelegatingSet

public DelegatingSet(java.util.Set<T> delegate)
Method Detail

equals

public boolean equals(java.lang.Object o)
Specified by:
equals in interface java.util.Collection<T>
Specified by:
equals in interface java.util.Set<T>
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Specified by:
hashCode in interface java.util.Collection<T>
Specified by:
hashCode in interface java.util.Set<T>
Overrides:
hashCode in class java.lang.Object