/** * Returns the root of a node (the topmost ancestor without parent node). * * @return root node */ public final ANode root() { final ANode p = parent(); return p == null ? this : p.root(); }