package collection; /** * A set of elements different from null. * * @author Franck van Breugel */ public interface Set> { /** * Tests whether this tree contains the given element. * * @param element the element for which to search. * @pre. element != null * @return true if this tree contains the given element. */ public boolean contains(T element); /** * Attempts to add the given element to this tree. * The attempt is successful if this tree does not contain the given element yet. * * @param element the element to be inserted. * @pre. element != null * @return true if the addition is successful, false otherwise. */ public boolean add(T element); }