net.sf.molae.pipe.basic
Class SetProxy<B extends Set<E>,E>

java.lang.Object
  extended by net.sf.molae.pipe.basic.ObjectProxy<B>
      extended by net.sf.molae.pipe.basic.CollectionProxy<B,E>
          extended by net.sf.molae.pipe.basic.SetProxy<B,E>
All Implemented Interfaces:
Iterable<E>, Collection<E>, Set<E>
Direct Known Subclasses:
KeyProjection, SortedSetProxy

public class SetProxy<B extends Set<E>,E>
extends CollectionProxy<B,E>
implements Set<E>

Delegates all method calls to another set. Useful base class for Set wrappers.


Constructor Summary
SetProxy(B base)
          Constructs a new proxy of the specified set.
 
Method Summary
 boolean equals(Object o)
          Indicates whether some other object is "equal to" this one.
 
Methods inherited from class net.sf.molae.pipe.basic.CollectionProxy
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from class net.sf.molae.pipe.basic.ObjectProxy
assertNotNull, getBase, hashCode, toString, toVerboseString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Constructor Detail

SetProxy

public SetProxy(B base)
Constructs a new proxy of the specified set.

Parameters:
base - the underlying object.
Throws:
NullPointerException - if the specified set is null.
Method Detail

equals

public boolean equals(Object o)
Description copied from class: ObjectProxy
Indicates whether some other object is "equal to" this one. This implementation checks three conditions:
  1. The object is not null.
  2. The classes of this and the other object are equal.
  3. The base objects are equal.

Specified by:
equals in interface Collection<E>
Specified by:
equals in interface Set<E>
Overrides:
equals in class ObjectProxy<B extends Set<E>>
Parameters:
o - the reference object with which to compare
Returns:
true if this object equals the specified object.