/*
 * โครงสร้างข้อมูล : ฉบับวาจาวา
 * http://www.cp.eng.chula.ac.th/~somchai/books
 */
package dataStructures;

/**
 * คลาสที่สร้างเซตด้วยต้นไม้ค้นหาแบบทวิภาค
 * @author สมชาย ประสิทธิ์จูตระกูล
 */
public class BSTSet implements Set {
  protected BSTree tree = new BSTree();
  public int size() {
    return tree.size();
  }
  public boolean isEmpty() {
    return tree.isEmpty();
  }
  public boolean contains(Object e) {
    return tree.get(e) != null;
  }
  public void add(Object e) {
    tree.add(e);
  }
  public void remove(Object e) {
    tree.remove(e);
  }
}