public boolean isReturnable(final DiffNode node) { if (node.isRootNode()) { return true; } if (node.isUntouched() && node.hasChildren()) { return true; } return stateFilterSettings.get(node.getState()); }
protected boolean filter(final DiffNode node) { return (node.isRootNode() && !node.hasChanges()) || (node.hasChanges() && !node.hasChildren()); }
protected final void visit(final Visitor visitor, final Visit visit) { try { visitor.node(this, visit); } catch (final StopVisitationException e) { visit.stop(); } if (visit.isAllowedToGoDeeper() && hasChildren()) { visitChildren(visitor); } if (visit.isStopped()) { throw new StopVisitationException(); } }
public void node(final DiffNode node, final Visit visit) { if (node.getState() == DiffNode.State.ADDED) { node.canonicalSet(head, node.canonicalGet(modified)); } else if (node.getState() == DiffNode.State.REMOVED) { node.canonicalUnset(head); } else if (node.getState() == DiffNode.State.CHANGED) { if (node.hasChildren()) { node.visitChildren(this); visit.dontGoDeeper(); } else { node.canonicalSet(head, node.canonicalGet(modified)); } } } }
public boolean isReturnable(final DiffNode node) { if (node.isRootNode()) { return true; } if (node.isUntouched() && node.hasChildren()) { return true; } return stateFilterSettings.get(node.getState()); }
protected boolean filter(final DiffNode node) { return (node.isRootNode() && !node.hasChanges()) || (node.hasChanges() && !node.hasChildren()); }
protected final void visit(final Visitor visitor, final Visit visit) { try { visitor.node(this, visit); } catch (final StopVisitationException e) { visit.stop(); } if (visit.isAllowedToGoDeeper() && hasChildren()) { visitChildren(visitor); } if (visit.isStopped()) { throw new StopVisitationException(); } }
@Override public void node(DiffNode node, Visit visit) { if (node.hasChanges() && !node.hasChildren()) { node.canonicalSet(person2, node.canonicalGet(person2) + "*");
if (node.hasChanges() && !node.hasChildren()) { childDiff.setNewValue(node.canonicalGet(newVersion)); childDiff.setOldValue(node.canonicalGet(oldVersion));
public void node(final DiffNode node, final Visit visit) { if (node.getState() == DiffNode.State.ADDED) { node.canonicalSet(head, node.canonicalGet(modified)); } else if (node.getState() == DiffNode.State.REMOVED) { node.canonicalUnset(head); } else if (node.getState() == DiffNode.State.CHANGED) { if (node.hasChildren()) { node.visitChildren(this); visit.dontGoDeeper(); } else { node.canonicalSet(head, node.canonicalGet(modified)); } } } }