package lab4B; import java.util.NoSuchElementException; /**simplified version of the java.util set interface*/ public interface Set extends Iterable{ /**Adds the specified element to this set if not already present*/ public boolean add(E e); /**Removes all of the elements from this set*/ public void clear(); /**Returns true if this set contains the specified element*/ public boolean contains(E e); /**Returns true if this set contains no elements*/ public boolean isEmpty(); /**Removes the specified element from this set, if it is present*/ public boolean remove(E e); /**Returns the number of elements in this set (its cardinality)*/ public int size(); /** returns an element of the set, if it is not empty*/ public E returnElement() throws NoSuchElementException; }