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. If a method returns false
,
then the comparison is immediately stopped. 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(String name,
NodeState after)
Called for all added child nodes.
|
boolean |
childNodeChanged(String name,
NodeState before,
NodeState after)
Called for all child nodes that may contain changes between the before
and after states.
|
boolean |
childNodeDeleted(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 stopboolean propertyChanged(PropertyState before, PropertyState after)
before
- property state before the changeafter
- property state after the changetrue
to continue the comparison, false
to stopboolean propertyDeleted(PropertyState before)
before
- property state before the changetrue
to continue the comparison, false
to stopboolean childNodeAdded(String name, NodeState after)
name
- name of the added child nodeafter
- child node state after the changetrue
to continue the comparison, false
to stopboolean childNodeChanged(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 stop"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"