- All Known Implementing Classes:
ArraySnapshotNode,ClassSnapshotNode,MapSnapshotNode,ReferenceSnapshotNode
public interface SnapshotNode
Snapshot of an object.
- Author:
- Peter Lamby
-
Method Summary
Modifier and TypeMethodDescriptiondiff(@Nullable SnapshotNode other, String path) Compare this node to theotherone.static DifferenceNodedoDiff(@Nullable SnapshotNode a, @Nullable SnapshotNode b, String path) Helper to compare twoSnapshotNodes that arenullsafe.value()The value that was used to create the snapshot.
-
Method Details
-
value
Object value()The value that was used to create the snapshot.Please not that the interior of the object may have been modified since the snapshot was taken.
- Returns:
- The value that was used to create the snapshot.
-
diff
Compare this node to theotherone.pathis used to provide context to the returnedDifferenceNode.- Parameters:
other- The other node.path- The relative path ofthisandother.- Returns:
- a
DifferenceNodedescribing the differences. Nevernull.
-
doDiff
Helper to compare twoSnapshotNodes that arenullsafe.pathis used to provide context to the returnedDifferenceNode.- Parameters:
a- The node to compare.b- The node to compare.path- The relative path ofaandb.- Returns:
- a
DifferenceNodedescribing the differences.
-