package structures;
public interface Set<E> {
void add(E e);
void remove(E e);
boolean isEmpty();
int getSize();
boolean contains(E e);
}
package structures;
public class BSTSet<E extends Comparable<E>> implements Set<E> {
private BST<E> bst;
public BSTSet() {
bst = new BST<>();
}
@Override
public void add(E e) {
bst.add(e);
}
@Override
public void remove(E e) {
bst.remove(e);
}
@Override
public boolean isEmpty() {
return bst.isEmpty();
}
@Override
public int getSize() {
return bst.getSize();
}
@Override
public boolean contains(E e) {
return bst.contains(e);
}
}