1 public interface MySet<E> extends java.lang.Iterable<E> { 2 /** Remove all elements from this set */ 3 public void clear(); 4 5 /** Return true if the element is in the set */ 6 public boolean contains(E e); 7 8 /** Add an element to the set */ 9 public boolean add(E e); 10 11 /** Remove the element from the set */ 12 public boolean remove(E e); 13 14 /** Return true if the set contains no elements */ 15 public boolean isEmpty(); 16 17 /** Return the number of elements in the set */ 18 public int size(); 19 }