public T successor(T data) {
    if (this.isEmpty())
      return null;
    if (this.getData().compareTo(data) < 0) {
      if (this.getRight() == null)
        return null;
      return this.getRight().successor(data);
    }
    if (this.getData().compareTo(data) > 0) {
      if (this.getLeft() == null)
        return null;
      T tmp;
      if ((tmp = this.getLeft().successor(data)) == null)
        return this.getData();
      return tmp;
    }
    if (this.getRight() == null)
      return null;
    return this.getRight().searchMin();
  }