org.eclipse.ocl.examples.eventmanager.util
Class CompositeSet<E>

java.lang.Object
  extended by org.eclipse.ocl.examples.eventmanager.CompositeIterable<E>
      extended by org.eclipse.ocl.examples.eventmanager.util.CompositeCollection<E>
          extended by org.eclipse.ocl.examples.eventmanager.util.CompositeSet<E>
All Implemented Interfaces:
java.lang.Iterable<E>, java.util.Collection<E>, java.util.Set<E>

public class CompositeSet<E>
extends CompositeCollection<E>
implements java.util.Set<E>

A composite collection that has unique entries only. Clients need to assert this property by themselves because only this way can we save the effort of actually iterating all elements of all sets which is the whole purpose of this class.

Author:
Axel Uhl (D043530)

Constructor Summary
CompositeSet(java.util.Set<? extends E>... sets)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 
Methods inherited from class org.eclipse.ocl.examples.eventmanager.util.CompositeCollection
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from class org.eclipse.ocl.examples.eventmanager.CompositeIterable
getIterables
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Constructor Detail

CompositeSet

public CompositeSet(java.util.Set<? extends E>... sets)
Method Detail

equals

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

hashCode

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