To compare two objects, use the ObjectDifferBuilder.buildDefault() method to create an ObjectDiffer instance, then call .compare(working, base) where working is the new state and base is the original state. This returns a DiffNode representing the root of the object graph.
Key DiffNode properties:
hasChanges(): Returns true if the node or its children have changed.childCount(): Returns the number of immediate children in the graph.getState(): Returns the DiffNode.State (e.g., CHANGED).getPath(): Returns the NodePath representing the location in the object graph.
Map<String, String> working = Collections.singletonMap("item", "foo");
Map<String, String> base = Collections.singletonMap("item", "bar");
DiffNode diff = ObjectDifferBuilder.buildDefault().compare(working, base);