/** * CSE 373, Winter 2011, Jessica Miller * An interface that defines the operations for a Set ADT for Ts. */ public interface Set { /** * Adds the specified T to the Set if it is not already present. * @return true if this set did not already contain the T */ public boolean add(T value); /** * Returns true if the set contains the specified T. */ public boolean contains(T value); /** * Prints the set in a tree-like format. */ public void print(); /** * Removes the specified T from this set if it is present. * @return true if this set contained the specified element */ public boolean remove(T value); /** * Returns the number of elements in this set (its cardinality) */ public int size(); }