Skip to content

How to get the difference between two simple objects? #210

Description

@franzisk

Sorry but I didn't get the point here.

Let's say I have two simple objects and I need to know if there is a difference between them and if there is I need to know where and I also need to know the previous value of that field and the new value.

Let's get this as an example:

Person person1 = new Person();
person1.setName("Freddy");
person1.setAge(22);

Person person2 = new Person();
person2.setName("Christoph");
person2.setAge(22);

What I want to achieve here is:

  • it was changed: yes
  • the attribute changed was "name"
  • the previous value was "Freddy"
  • the current value is "Christoph"

Any help on that?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions