randoop.util
Class SimpleSet<T>

Object
  extended by SimpleSet<T>
All Implemented Interfaces:
ISimpleSet<T>

public class SimpleSet<T>
extends Object
implements ISimpleSet<T>


Constructor Summary
Constructor and Description
SimpleSet()
           
 
Method Summary
Modifier and Type Method and Description
 void add(T elt)
          Adds the given elt to the set.
 boolean contains(T elt)
          Returns true if elt is in this set.
 Set<T> getElements()
          Returns the elements in this set, as a java.util.Set
 void remove(T elt)
          Removes the given elt from the set.
 int size()
          Returns the size of this set.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ISimpleSet
toString
 

Constructor Detail

SimpleSet

public SimpleSet()
Method Detail

add

public void add(T elt)
Description copied from interface: ISimpleSet
Adds the given elt to the set. Precondition: the given elt is not already in the set.

Specified by:
add in interface ISimpleSet<T>
Parameters:
elt - cannot be null.

contains

public boolean contains(T elt)
Description copied from interface: ISimpleSet
Returns true if elt is in this set.

Specified by:
contains in interface ISimpleSet<T>
Parameters:
elt - cannot be null.

getElements

public Set<T> getElements()
Description copied from interface: ISimpleSet
Returns the elements in this set, as a java.util.Set

Specified by:
getElements in interface ISimpleSet<T>

remove

public void remove(T elt)
Description copied from interface: ISimpleSet
Removes the given elt from the set. Precondition: the given elt is in the set.

Specified by:
remove in interface ISimpleSet<T>
Parameters:
elt - cannot be null.

size

public int size()
Description copied from interface: ISimpleSet
Returns the size of this set.

Specified by:
size in interface ISimpleSet<T>