public interface BinaryTreeInterface> { /** * * @return the number of items in the tree */ int size(); /** * * @return the maximum number of links between * the root of the tree and the most distant leaf */ int maxDepth(); /** * * @return return true if the tree has no nodes */ boolean isEmpty(); /** * @return true if the given element exists in the tree and false otherwise */ boolean contains(E element); /** * Add an element to the tree (if the element does not already exist * in the tree) If the element already is in the tree, do nothing. * @param element the element to be added */ void insert(E element); /** * Remove something from the tree * @param element the element to be removed * @return element if it was in the tree, null otherwise */ E remove(E element); }