/** * Checks if the filter matches this node all the way to the root. * * @param filter the filter being checked. * @return true iff the filter accepts this node, as a part of its full context (yaml tree ending at this node). */ @JsonIgnore public boolean matchesToRoot(NodeFilter filter) { boolean result = matchesLocally(filter); if (parent == null || !result) { return result; } return parent.matchesToRoot(filter); }
/** * Checks if the filter matches this node all the way to the root. * * @param filter the filter being checked. * @return true iff the filter accepts this node, as a part of its full context (yaml tree ending at this node). */ @JsonIgnore public boolean matchesToRoot(NodeFilter filter) { boolean result = matchesLocally(filter); if (parent == null || !result) { return result; } return parent.matchesToRoot(filter); }
@Override public Node getNext(NodeFilter filter) { while (hasNext()) { Node result = getNext(); if (result.matchesToRoot(filter)) { return result; } } return null; }
@Override public Node getNext(NodeFilter filter) { while (hasNext()) { Node result = getNext(); if (result.matchesToRoot(filter)) { return result; } } return null; }