MCPcopy Index your code
hub / github.com/apache/groovy / getAt

Method getAt

src/main/java/groovy/util/Node.java:537–548  ·  view source on GitHub ↗

Provides lookup of elements by QName. @param name the QName of interest @return the nodes matching name

(QName name)

Source from the content-addressed store, hash-verified

535 * @return the nodes matching name
536 */
537 public NodeList getAt(QName name) {
538 NodeList answer = new NodeList();
539 for (Object child : children()) {
540 if (child instanceof Node childNode) {
541 Object childNodeName = childNode.name();
542 if (name.matches(childNodeName)) {
543 answer.add(childNode);
544 }
545 }
546 }
547 return answer;
548 }
549
550 /**
551 * Provides lookup of elements by name.

Callers

nothing calls this directly

Calls 4

childrenMethod · 0.95
nameMethod · 0.65
matchesMethod · 0.65
addMethod · 0.65

Tested by

no test coverage detected