code: private static <V> TreeEntry<V> successor(TreeEntry<V> t) {
          if (t == null) {
              return null;
          } else if (t.right != null) {
              TreeEntry<V> p = t.right;
              while (p.left != null) {
                  p = p.left;
              }
              return p;
          } else {
              TreeEntry<V> p = t.parent;
              TreeEntry<V> ch = t;
              while (p != null && ch == p.right) {
                  ch = p;
                  p = p.parent;
              }
              return p;
          }
      }
docs: Returns the successor of the specified Entry, or null if no such.
  
  @param <V> the value type