code: public int setParent(Node parent)
      {
          if (parent != null)
          {
              depth = parent.getDepth() + 1;
          }
          this.parent = parent;
          return depth;
      }
docs: Set the node parent.
  
  @param parent The node parent.
  @return depth The from parent.