code: public static <K, V> OMVRBTreeEntry<K, V> successor(final OMVRBTreeEntry<K, V> t) {
      if (t == null)
        return null;
  
      OMVRBTreeEntry<K, V> p = null;
  
      if (t.getRight() != null) {
        p = t.getRight();
        while (p.getLeft() != null)
          p = p.getLeft();
      } else {
        p = t.getParent();
        OMVRBTreeEntry<K, V> ch = t;
        while (p != null && ch == p.getRight()) {
          ch = p;
          p = p.getParent();
        }
      }
  
      return p;
    }
docs: Returns the successor of the specified Entry, or null if no such.