private Map<String, Node> serializedNodeFields() { Map<String, Node> res = new HashMap<>(); NodeIterator iterator = this.getChildren(); Node next = iterator.getNext(); while (next != null) { res.put(next.getNodeName(), next); next = iterator.getNext(); } return res; }
private Map<String, Node> serializedNodeFields() { Map<String, Node> res = new HashMap<>(); NodeIterator iterator = this.getChildren(); Node next = iterator.getNext(); while (next != null) { res.put(next.getNodeName(), next); next = iterator.getNext(); } return res; }
public void recursiveConsume(Consumer<Node> consumer) { consumer.accept(this); NodeIterator children = getChildren(); Node child = children.getNext(); while (child != null) { child.recursiveConsume(consumer); child = children.getNext(); } }
@JsonIgnore public void parentify() { NodeIterator children = getChildren(); Node child = children.getNext(); while (child != null) { child.parent = this; child.parentify(); child = children.getNext(); } }
public void recursiveConsume(Consumer<Node> consumer) { consumer.accept(this); NodeIterator children = getChildren(); Node child = children.getNext(); while (child != null) { child.recursiveConsume(consumer); child = children.getNext(); } }
@JsonIgnore public void parentify() { NodeIterator children = getChildren(); Node child = children.getNext(); while (child != null) { child.parent = this; child.parentify(); child = children.getNext(); } }
private void recursiveValidate(ConfigProblemSetBuilder psBuilder, Node node, NodeFilter filter) { int runCount = validatorCollection.runAllValidators(psBuilder, node); log.info("Ran " + runCount + " validators for node \"" + node.getNodeName() + "\" with class \"" + node.getClass().getSimpleName() + "\""); NodeIterator children = node.getChildren(); Node recurse = children.getNext(filter); while (recurse != null) { recursiveValidate(psBuilder, recurse, filter); recurse = children.getNext(filter); } } }
private void recursiveValidate(ConfigProblemSetBuilder psBuilder, Node node, NodeFilter filter) { int runCount = validatorCollection.runAllValidators(psBuilder, node); log.info("Ran " + runCount + " validators for node \"" + node.getNodeName() + "\" with class \"" + node.getClass().getSimpleName() + "\""); NodeIterator children = node.getChildren(); Node recurse = children.getNext(filter); while (recurse != null) { recursiveValidate(psBuilder, recurse, filter); recurse = children.getNext(filter); } } }
/** * @param node is the node whose children we want to find. * @param filter is the filter to lookup by. * @return the children of the input node matching the filter. */ private List<Node> getMatchingNodes(Node node, NodeFilter filter) { log.trace("Checking for leaf nodes of node " + node.getNodeName()); List<Node> result = new ArrayList<>(); NodeIterator children = node.getChildren(); Node recurse = children.getNext(filter); while (recurse != null) { result.addAll(getMatchingNodes(recurse, filter)); recurse = children.getNext(filter); } // If we have visited this node, it must have matched the filter. result.add(node); return result; }
/** * @param node is the node whose children we want to find. * @param filter is the filter to lookup by. * @return the children of the input node matching the filter. */ private List<Node> getMatchingNodes(Node node, NodeFilter filter) { log.trace("Checking for leaf nodes of node " + node.getNodeName()); List<Node> result = new ArrayList<>(); NodeIterator children = node.getChildren(); Node recurse = children.getNext(filter); while (recurse != null) { result.addAll(getMatchingNodes(recurse, filter)); recurse = children.getNext(filter); } // If we have visited this node, it must have matched the filter. result.add(node); return result; }
private void validateClusters(final ConfigProblemSetBuilder problems, final DCOSAccount account) { final NodeIterator children = account.getParent().getChildren();
private void validateClusters(final ConfigProblemSetBuilder problems, final DCOSAccount account) { final NodeIterator children = account.getParent().getChildren();