/** * Check if node is root node and has no children. * * @param node The node to check. * @return <tt>true</tt>, if the node has no father node and no children. */ public static boolean isRootWithoutChildren(ConstNode node) { return (!node.hasFather() && !node.hasChildren()); }
/** Get last node in main variation. */ public static ConstNode getLast(ConstNode node) { while (node.hasChildren()) node = node.getChildConst(); return node; }