/** * Checks if the node can be appended on the given parent node * * @param node * The given node * @param parentNode * The given parent node * @return True if the given node can be appended on the parent node */ public static boolean canAppend(Node node, Node parentNode) { if (node == null || parentNode == null || node == parentNode || isAncestorOf(node, parentNode)) { return false; } return true; }
/** * Checks if the node can be appended on the given parent node * * @param node * The given node * @param parentNode * The given parent node * @return True if the given node can be appended on the parent node */ public static boolean canAppend(Node node, Node parentNode) { if (node == null || parentNode == null || node == parentNode || isAncestorOf(node, parentNode)) { return false; } return true; }
/** * Checks if the node can be appended on the given parent node * * @param node * The given node * @param parentNode * The given parent node * @return True if the given node can be appended on the parent node */ public static boolean canAppend(Node node, Node parentNode) { if (node == null || parentNode == null || node == parentNode || isAncestorOf(node, parentNode)) { return false; } return true; }
/** * Checks if any of from the given list of nodes is an ancestor to another * node * * @param ancestorNodes * The potential ancestor nodes * @param node * The potential descendant node * @return True if at least one node is ancestor of the given node */ public static boolean isAnyNodeAncestorOf(ArrayList ancestorNodes, Node node) { int n = ancestorNodes.size(); for (Object ancestorNode : ancestorNodes) { Node ancestor = (Node) ancestorNode; if (isAncestorOf(ancestor, node)) { return true; } } return false; }
/** * Checks if any of from the given list of nodes is an ancestor to another * node * * @param ancestorNodes * The potential ancestor nodes * @param node * The potential descendant node * @return True if at least one node is ancestor of the given node */ public static boolean isAnyNodeAncestorOf(ArrayList ancestorNodes, Node node) { int n = ancestorNodes.size(); for (Object ancestorNode : ancestorNodes) { Node ancestor = (Node) ancestorNode; if (isAncestorOf(ancestor, node)) { return true; } } return false; }
/** * Checks if any of from the given list of nodes is an ancestor to another * node * * @param ancestorNodes * The potential ancestor nodes * @param node * The potential descendant node * @return True if at least one node is ancestor of the given node */ public static boolean isAnyNodeAncestorOf(ArrayList ancestorNodes, Node node) { int n = ancestorNodes.size(); for (int i = 0; i < n; i++) { Node ancestor = (Node) ancestorNodes.get(i); if (isAncestorOf(ancestor, node)) { return true; } } return false; }
Node currentNode) { if (mutationEventType.equals("DOMNodeInserted")) { if (DOMUtilities.isAncestorOf(currentNode, affectedNode)) { return true; if (DOMUtilities.isAncestorOf(currentNode, affectedNode)) { return true; if (DOMUtilities.isAncestorOf(currentNode, affectedNode) || currentNode == affectedNode) { return true; if (DOMUtilities.isAncestorOf(currentNode, affectedNode)) { return true;
Node currentNode) { if (mutationEventType.equals("DOMNodeInserted")) { if (DOMUtilities.isAncestorOf(currentNode, affectedNode)) { return true; if (DOMUtilities.isAncestorOf(currentNode, affectedNode)) { return true; if (DOMUtilities.isAncestorOf(currentNode, affectedNode) || currentNode == affectedNode) { return true; if (DOMUtilities.isAncestorOf(currentNode, affectedNode)) { return true;