MCPcopy Index your code
hub / github.com/HtmlUnit/htmlunit / isAncestorOf

Method isAncestorOf

src/main/java/org/htmlunit/html/DomNode.java:339–348  ·  view source on GitHub ↗

Returns true if this node is an ancestor of the specified node. @param node the node to check @return true if this node is an ancestor of the specified node

(final DomNode node)

Source from the content-addressed store, hash-verified

337 * @return {@code true} if this node is an ancestor of the specified node
338 */
339 public boolean isAncestorOf(final DomNode node) {
340 DomNode parent = node;
341 while (parent != null) {
342 if (parent == this) {
343 return true;
344 }
345 parent = parent.getParentNode();
346 }
347 return false;
348 }
349
350 /**
351 * Returns {@code true} if this node is an ancestor of the specified nodes.

Callers 15

isAncestorOfAnyMethod · 0.95
appendChildMethod · 0.95
moveBeforeMethod · 0.95
removeMethod · 0.95
removeMethod · 0.95
removeMethod · 0.95
deleteContentsMethod · 0.95
removeChildMethod · 0.80
isExecutionNeededMethod · 0.80
addMappedElementMethod · 0.80
removeMappedElementMethod · 0.80

Calls 1

getParentNodeMethod · 0.95

Tested by

no test coverage detected