org.eclipse.ocl.examples.impactanalyzer.util
Class FlatSet

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractSet<E>
          extended by java.util.HashSet<AnnotatedEObject>
              extended by org.eclipse.ocl.examples.impactanalyzer.util.FlatSet
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<AnnotatedEObject>, java.util.Collection<AnnotatedEObject>, java.util.Set<AnnotatedEObject>, OperationCallExpKeyedSet

public class FlatSet
extends java.util.HashSet<AnnotatedEObject>
implements OperationCallExpKeyedSet

A simplified implementation of the OperationCallExpKeyedSet interface which is actually unable to associate the AnnotatedEObjects with OperationCallExp expressions but instead just keeps the AnnotatedEObjects as flat sets.

Author:
Axel Uhl (D043530)
See Also:
Serialized Form

Constructor Summary
FlatSet()
          Only used to create the EMPTY_SET
FlatSet(AnnotatedEObject aeo)
           
FlatSet(java.util.Collection<OperationCallExpKeyedSet> sets)
           
 
Method Summary
static OperationCallExpKeyedSet emptySet()
           
 java.lang.Iterable<java.util.Map.Entry<OperationCallExp,java.lang.Iterable<AnnotatedEObject>>> entrySet()
          The returned iterable's iterator produces a single element with this set contained as iterable value, or an empty iterable in case this set is empty.
 java.lang.Iterable<AnnotatedEObject> getCombinedResultsFor(OperationCallExp oce)
          The combined results is this set itself because it always contains all results for all operation calls, already combined.
 
Methods inherited from class java.util.HashSet
add, clear, clone, contains, isEmpty, iterator, remove, size
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.ocl.examples.impactanalyzer.util.OperationCallExpKeyedSet
isEmpty
 
Methods inherited from interface java.lang.Iterable
iterator
 
Methods inherited from interface java.util.Set
addAll, containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray
 

Constructor Detail

FlatSet

public FlatSet()
Only used to create the EMPTY_SET


FlatSet

public FlatSet(AnnotatedEObject aeo)

FlatSet

public FlatSet(java.util.Collection<OperationCallExpKeyedSet> sets)
Method Detail

getCombinedResultsFor

public java.lang.Iterable<AnnotatedEObject> getCombinedResultsFor(OperationCallExp oce)
The combined results is this set itself because it always contains all results for all operation calls, already combined. The oce parameter is ignored here.

Specified by:
getCombinedResultsFor in interface OperationCallExpKeyedSet

entrySet

public java.lang.Iterable<java.util.Map.Entry<OperationCallExp,java.lang.Iterable<AnnotatedEObject>>> entrySet()
The returned iterable's iterator produces a single element with this set contained as iterable value, or an empty iterable in case this set is empty.

Specified by:
entrySet in interface OperationCallExpKeyedSet

emptySet

public static OperationCallExpKeyedSet emptySet()