public boolean compareAgainstBaseState(NodeState base, NodeStateDiff diff) { if (base == EMPTY_NODE || !base.exists()) { return EmptyNodeState.compareAgainstEmptyState(this, diff);
public boolean compareAgainstBaseState(NodeState base, NodeStateDiff diff) { if (base == EMPTY_NODE || !base.exists()) { return EmptyNodeState.compareAgainstEmptyState(this, diff);
@Override public boolean compareAgainstBaseState(NodeState base, NodeStateDiff diff) { if (this == base) { return true; } else if (base == EMPTY_NODE || !base.exists()) { // special case return EmptyNodeState.compareAgainstEmptyState(this, diff); } else if (this.base == base) { return modified.compareAgainstBaseState(this.base, diff); } else if (base instanceof AbstractDocumentNodeState) { AbstractDocumentNodeState other = (AbstractDocumentNodeState) base; if (this.base.getPath().equals(other.getPath())) { if (revisionEquals(this.base, other)) { return modified.compareAgainstBaseState(this.base, diff); } } } // fall back to the generic node state diff algorithm return super.compareAgainstBaseState(base, diff); }
@Override public boolean compareAgainstBaseState(NodeState base, NodeStateDiff diff) { if (this == base) { return true; } else if (base == EMPTY_NODE || !base.exists()) { // special case return EmptyNodeState.compareAgainstEmptyState(this, diff); } else if (this.base == base) { return modified.compareAgainstBaseState(this.base, diff); } else if (base instanceof AbstractDocumentNodeState) { AbstractDocumentNodeState other = (AbstractDocumentNodeState) base; if (this.base.getPath().equals(other.getPath())) { if (revisionEquals(this.base, other)) { return modified.compareAgainstBaseState(this.base, diff); } } } // fall back to the generic node state diff algorithm return super.compareAgainstBaseState(base, diff); }
} else if (base == EMPTY_NODE || !base.exists()) { return EmptyNodeState.compareAgainstEmptyState(this, diff); } else if (base instanceof AbstractDocumentNodeState) { AbstractDocumentNodeState mBase = (AbstractDocumentNodeState) base;
} else if (base == EMPTY_NODE || !base.exists()) { return EmptyNodeState.compareAgainstEmptyState(this, diff); } else if (base instanceof AbstractDocumentNodeState) { AbstractDocumentNodeState mBase = (AbstractDocumentNodeState) base;
String p = path + '/' + name; if (Text.isDescendantOrEqual(p, PRIVILEGES_PATH)) { EmptyNodeState.compareAgainstEmptyState(after, new PrivilegeDiff(this, name, nodeBuilder.child(name)));
String p = path + '/' + name; if (Text.isDescendantOrEqual(p, PRIVILEGES_PATH)) { EmptyNodeState.compareAgainstEmptyState(after, new PrivilegeDiff(this, name, nodeBuilder.child(name)));
String p = path + '/' + name; if (Text.isDescendantOrEqual(p, PRIVILEGES_PATH)) { EmptyNodeState.compareAgainstEmptyState(after, new PrivilegeDiff(this, name, nodeBuilder.child(name)));
return true; // no changes } else if (base == EMPTY_NODE || !base.exists()) { // special case return EmptyNodeState.compareAgainstEmptyState(this, diff); } else if (!(base instanceof SegmentNodeState)) { // fallback return AbstractNodeState.compareAgainstBaseState(this, base, diff);