public interface NodeStateDiff
NodeState.compareAgainstBaseState(NodeState, NodeStateDiff)
method reports detected node state differences by calling methods of
a handler instance that implements this interface.
The compare method goes through all properties and child nodes of the two states, calling the relevant added, changed or deleted methods where appropriate. Differences in the ordering of properties or child nodes do not affect the comparison, and the order in which such differences are reported is unspecified.
The methods in this interface all return a boolean value to signify whether
the comparison should continue or abort. If a method returns false
,
then the comparison is immediately stopped, that means sibling nodes and
sibling nodes of all parents are not further processed. Otherwise it
continues until all changes have been reported.
Note that the
NodeState.compareAgainstBaseState(NodeState, NodeStateDiff)
method only compares the given states without recursing to the subtrees
below. An implementation of this interface should recursively call that
method for the relevant child node entries to find out all the changes
across the entire subtree below the given node.
Modifier and Type | Method and Description |
---|---|
boolean |
childNodeAdded(java.lang.String name,
NodeState after)
Called for all added child nodes.
|
boolean |
childNodeChanged(java.lang.String name,
NodeState before,
NodeState after)
Called for all child nodes that may contain changes between the before
and after states.
|
boolean |
childNodeDeleted(java.lang.String name,
NodeState before)
Called for all deleted child nodes.
|
boolean |
propertyAdded(PropertyState after)
Called for all added properties.
|
boolean |
propertyChanged(PropertyState before,
PropertyState after)
Called for all changed properties.
|
boolean |
propertyDeleted(PropertyState before)
Called for all deleted properties.
|
boolean propertyAdded(PropertyState after)
after
- property state after the changetrue
to continue the comparison, false
to abort.
Abort will stop comparing completely, that means sibling nodes
and sibling nodes of all parents are not further compared.boolean propertyChanged(PropertyState before, PropertyState after)
before
- property state before the changeafter
- property state after the changetrue
to continue the comparison, false
to abort.
Abort will stop comparing completely, that means sibling nodes
and sibling nodes of all parents are not further compared.boolean propertyDeleted(PropertyState before)
before
- property state before the changetrue
to continue the comparison, false
to abort.
Abort will stop comparing completely, that means sibling nodes
and sibling nodes of all parents are not further compared.boolean childNodeAdded(java.lang.String name, NodeState after)
name
- name of the added child nodeafter
- child node state after the changetrue
to continue the comparison, false
to abort.
Abort will stop comparing completely, that means sibling nodes
and sibling nodes of all parents are not further compared.boolean childNodeChanged(java.lang.String name, NodeState before, NodeState after)
name
- name of the changed child nodebefore
- child node state before the changeafter
- child node state after the changetrue
to continue the comparison, false
to abort.
Abort will stop comparing completely, that means sibling nodes
and sibling nodes of all parents are not further compared.boolean childNodeDeleted(java.lang.String name, NodeState before)
name
- name of the deleted child nodebefore
- child node state before the changetrue
to continue the comparison, false
to abort.
Abort will stop comparing completely, that means sibling nodes
and sibling nodes of all parents are not further compared."Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"