public interface Set { public void insert(Element x); public void delete(Element x); /** * Find and return the Element x in this set if there; otherwise null. * Note that x may match (by elEquals) an element in this set, even * though x is not equal to that element. Thus, this method can return * a different element than x---one that matches x through elEquals but * does not == x. */ public Element find(Element x); /** * Does this Set have Element x? * Possible implementation: find(x) != null */ public boolean hasElement(Element x); public void union(Set other); public void intersection(Set other); public void difference(Set other); /** * Return the elements of this set as an array. * The elements need not show up in any particular order. */ public Element[] getContents(); /** * Returns the number of elements in this set. * Possible implementation: getContents().length * */ public int sizeOf(); /** * Is this set empty? * Possible implementation: sizeOf() == 0 */ public boolean isEmpty(); }