// Erika Wolfe, CSE 143 // A collection that contains no duplicate elements. public interface Set { // want to have: add, size, contains, remove, isEmpty // Adds the given value to this set only if it isn't // already contained in the set public void add(E val); // Returns the number of elements in this set public int size(); // Returns true if the set has no elements, false otherwise. public boolean isEmpty(); // Returns true if the given value is an element of this set, // false otherwise public boolean contains(E val); // Removes the given value from this set only if it is // already contained in the set. public void remove(E val); }