/* * IntSet.java */ package datastructures; /** * * @author hs */ public interface IntSet { // model: math. sets like {x,y,z}, all elements have the same type // boolean isEmpty(); // pre: true // boolean contains(int e); // pre: true // result: o is an element of this void add(int e); // pre: true // post : this = THIS 'union' {o} // result = contains(e); boolean remove (int e); // pre: true // post: this = THIS \ {o} int size(); //pre: true // result = |this| i.e. number of elements of this set. void showSet(); // simple Printout of set }