TypesSpec
Class ArraySet<T>

java.lang.Object
  extended by TypesSpec.AbstractSet<T>
      extended by TypesSpec.ArraySet<T>
All Implemented Interfaces:
java.lang.Iterable<T>, Set<T>

public final class ArraySet<T>
extends AbstractSet<T>

Mise en oeuvre des "set" a la Spec a l'aide d'un tableau.

Version:
Automne 2008
Author:
Guy Tremblay

Constructor Summary
ArraySet()
           
 
Method Summary
 Set<T> add(T elem)
           
 java.util.Iterator<T> iterator()
           
 int size()
           
 java.lang.String toString()
           
 
Methods inherited from class TypesSpec.AbstractSet
add, add, all, difference, difference, equals, equals, generate, generate, IN, IN, intersection, intersection, number, reduce, reduce, size, some, subset, subset, toString, U, U
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ArraySet

public ArraySet()
Method Detail

add

public Set<T> add(T elem)
Specified by:
add in interface Set<T>
Specified by:
add in class AbstractSet<T>

size

public int size()
Specified by:
size in interface Set<T>
Overrides:
size in class AbstractSet<T>

toString

public java.lang.String toString()
Specified by:
toString in interface Set<T>
Overrides:
toString in class AbstractSet<T>

iterator

public java.util.Iterator<T> iterator()
Specified by:
iterator in interface java.lang.Iterable<T>
Specified by:
iterator in interface Set<T>
Specified by:
iterator in class AbstractSet<T>