/** * Get the depth level of this node in the tree (equals 1 for * a parentless node). * * @param n Node to be examined. * @return the number of ancestors, plus one * @xsl.usage internal */ public short getLevel(Node n) { short level = 1; while (null != (n = getParentOfNode(n))) { level++; } return level; }
/** * Get the first unparented node in the ancestor chain. * @deprecated * * @param node Starting node, to specify which chain to chase * * @return the topmost ancestor. */ public Node getRoot(Node node) { Node root = null; while (node != null) { root = node; node = getParentOfNode(node); } return root; }
/** * Get the depth level of this node in the tree (equals 1 for * a parentless node). * * @param n Node to be examined. * @return the number of ancestors, plus one * @xsl.usage internal */ public short getLevel(Node n) { short level = 1; while (null != (n = getParentOfNode(n))) { level++; } return level; }
/** * Get the first unparented node in the ancestor chain. * @deprecated * * @param node Starting node, to specify which chain to chase * * @return the topmost ancestor. */ public Node getRoot(Node node) { Node root = null; while (node != null) { root = node; node = getParentOfNode(node); } return root; }
parent = getParentOfNode(parent);
parent = getParentOfNode(parent);
Node parent1 = getParentOfNode(node1); Node parent2 = getParentOfNode(node2); parent1 = getParentOfNode(parent1); parent2 = getParentOfNode(parent2); startNode2 = getParentOfNode(startNode2); startNode1 = getParentOfNode(startNode1); startNode1 = getParentOfNode(startNode1); prevChild2 = startNode2; startNode2 = getParentOfNode(startNode2);
Node parent1 = getParentOfNode(node1); Node parent2 = getParentOfNode(node2); parent1 = getParentOfNode(parent1); parent2 = getParentOfNode(parent2); startNode2 = getParentOfNode(startNode2); startNode1 = getParentOfNode(startNode1); startNode1 = getParentOfNode(startNode1); prevChild2 = startNode2; startNode2 = getParentOfNode(startNode2);
parent = getParentOfNode(parent);
parent = getParentOfNode(parent);
/** * Get the depth level of this node in the tree (equals 1 for * a parentless node). * * @param n Node to be examined. * @return the number of ancestors, plus one * @xsl.usage internal */ public short getLevel(Node n) { short level = 1; while (null != (n = getParentOfNode(n))) { level++; } return level; }
/** * Get the depth level of this node in the tree (equals 1 for * a parentless node). * * @param n Node to be examined. * @return the number of ancestors, plus one * @xsl.usage internal */ public short getLevel(Node n) { short level = 1; while (null != (n = getParentOfNode(n))) { level++; } return level; }
/** * Get the first unparented node in the ancestor chain. * @deprecated * * @param node Starting node, to specify which chain to chase * * @return the topmost ancestor. */ public Node getRoot(Node node) { Node root = null; while (node != null) { root = node; node = getParentOfNode(node); } return root; }
/** * Get the depth level of this node in the tree (equals 1 for * a parentless node). * * @param n Node to be examined. * @return the number of ancestors, plus one * @xsl.usage internal */ public short getLevel(Node n) { short level = 1; while (null != (n = getParentOfNode(n))) { level++; } return level; }
/** * Get the depth level of this node in the tree (equals 1 for * a parentless node). * * @param n Node to be examined. * @return the number of ancestors, plus one * @xsl.usage internal */ public short getLevel(Node n) { short level = 1; while (null != (n = getParentOfNode(n))) { level++; } return level; }
/** * Get the first unparented node in the ancestor chain. * @deprecated * * @param node Starting node, to specify which chain to chase * * @return the topmost ancestor. */ public Node getRoot(Node node) { Node root = null; while (node != null) { root = node; node = getParentOfNode(node); } return root; }
/** * Get the depth level of this node in the tree (equals 1 for * a parentless node). * * @param n Node to be examined. * @return the number of ancestors, plus one * @xsl.usage internal */ public short getLevel(Node n) { short level = 1; while (null != (n = getParentOfNode(n))) { level++; } return level; }
/** * Get the depth level of this node in the tree (equals 1 for * a parentless node). * * @param n Node to be examined. * @return the number of ancestors, plus one * @xsl.usage internal */ public short getLevel(Node n) { short level = 1; while (null != (n = getParentOfNode(n))) { level++; } return level; }
/** * Get the depth level of this node in the tree (equals 1 for * a parentless node). * * @param n Node to be examined. * @return the number of ancestors, plus one * @xsl.usage internal */ public short getLevel(Node n) { short level = 1; while (null != (n = getParentOfNode(n))) { level++; } return level; }
/** * Get the depth level of this node in the tree (equals 1 for * a parentless node). * * @param n Node to be examined. * @return the number of ancestors, plus one * @xsl.usage internal */ public short getLevel(Node n) { short level = 1; while (null != (n = getParentOfNode(n))) { level++; } return level; }