uk.ac.ucl.cs.emofocl.jmi.reflect.extended
Class Set

java.lang.Object
  extended by uk.ac.ucl.cs.emofocl.jmi.reflect.extended.OCLCollection
      extended by uk.ac.ucl.cs.emofocl.jmi.reflect.extended.Set
All Implemented Interfaces:
Iterable, Collection, Set

public class Set
extends OCLCollection
implements Set

Author:
James

Constructor Summary
Set(CollectionType type, int lower, int upper)
           
Set(Type elementType)
           
 
Method Summary
 boolean add(Object arg0)
           
 boolean addAll(Collection collection)
           
 void clear()
           
 boolean contains(Object o)
           
 boolean containsAll(Collection arg0)
           
 boolean equals(Object other)
          Equal if all contents are equal.
 boolean extEquals(Object other)
           
 int extHashValue()
           
 boolean isEmpty()
           
 Iterator iterator()
           
protected static void quickSort(int[] unsorted)
           
protected static void quickSort(int[] unsorted, int l, int h, int[] lower, int[] higher)
           
 boolean remove(Object o)
           
 boolean removeAll(Collection collection)
           
 boolean retainAll(Collection collection)
           
 int size()
           
 Object[] toArray()
           
 Object[] toArray(Object[] arg0)
           
 String toString()
           
 
Methods inherited from class uk.ac.ucl.cs.emofocl.jmi.reflect.extended.OCLCollection
extElementEquals, extElementHashValue, getType, refVerifyConstraints
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
hashCode
 

Constructor Detail

Set

public Set(CollectionType type,
           int lower,
           int upper)

Set

public Set(Type elementType)
Method Detail

size

public int size()
Specified by:
size in interface Collection
Specified by:
size in interface Set
Specified by:
size in class OCLCollection

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection
Specified by:
isEmpty in interface Set

contains

public boolean contains(Object o)
Specified by:
contains in interface Collection
Specified by:
contains in interface Set

iterator

public Iterator iterator()
Specified by:
iterator in interface Iterable
Specified by:
iterator in interface Collection
Specified by:
iterator in interface Set
Specified by:
iterator in class OCLCollection

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection
Specified by:
toArray in interface Set

toArray

public Object[] toArray(Object[] arg0)
Specified by:
toArray in interface Collection
Specified by:
toArray in interface Set

add

public boolean add(Object arg0)
Specified by:
add in interface Collection
Specified by:
add in interface Set
Overrides:
add in class OCLCollection

remove

public boolean remove(Object o)
Specified by:
remove in interface Collection
Specified by:
remove in interface Set
Overrides:
remove in class OCLCollection

containsAll

public boolean containsAll(Collection arg0)
Specified by:
containsAll in interface Collection
Specified by:
containsAll in interface Set

addAll

public boolean addAll(Collection collection)
Specified by:
addAll in interface Collection
Specified by:
addAll in interface Set

removeAll

public boolean removeAll(Collection collection)
Specified by:
removeAll in interface Collection
Specified by:
removeAll in interface Set

retainAll

public boolean retainAll(Collection collection)
Specified by:
retainAll in interface Collection
Specified by:
retainAll in interface Set

clear

public void clear()
Specified by:
clear in interface Collection
Specified by:
clear in interface Set

quickSort

protected static void quickSort(int[] unsorted)

quickSort

protected static void quickSort(int[] unsorted,
                                int l,
                                int h,
                                int[] lower,
                                int[] higher)

extHashValue

public int extHashValue()
Specified by:
extHashValue in class OCLCollection

extEquals

public boolean extEquals(Object other)
Specified by:
extEquals in class OCLCollection

equals

public boolean equals(Object other)
Equal if all contents are equal.

Specified by:
equals in interface Collection
Specified by:
equals in interface Set
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object