net.sf.molae.pipe.basic
Class SetProxy<B extends Set<E>,E>
java.lang.Object
net.sf.molae.pipe.basic.ObjectProxy<B>
net.sf.molae.pipe.basic.CollectionProxy<B,E>
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 interface java.util.Set |
add, addAll, clear, contains, containsAll, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
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
.
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:
- The object is not
null
.
- The classes of this and the other object are equal.
- 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.