Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instance, or List of Instances, of a Class inside a Class - Creating Diff #198

Open
RA-AlexRees opened this issue Jan 29, 2018 · 2 comments

Comments

@RA-AlexRees
Copy link

RA-AlexRees commented Jan 29, 2018

Hi there,
I have a class which has instances of other classes declared inside. An example is below:

public class Person {

public int personID;
public String personName;
public String personCode;
public Transports transports;
public Categories categories;
public List<Insurance> insurance;

}

Transports, Categories & Insurance, are an instances, or list of instances, of a class, which can include another class inside, if that makes sense?

What I would like to have done is get the difference between 2 Person classes, whilst going in to the nested classes and only returning the difference.

I hope this makes sense!

Thanks,
Alex

@RA-AlexRees RA-AlexRees changed the title Nested Classes Instance, or List of Instances, of a Class inside a Class - Creating Diff Jan 30, 2018
@nitin-b
Copy link

nitin-b commented Jul 19, 2018

I also have a similar requirement. Have you found a way to get it working? Without a way to find out exact difference in a particular property of 'Insurance' in the above example, the java object comparison isn't useful for me.

@jianhong-li
Copy link

This feature is supported. but you should implement the interface:
de.danielbechler.diff.identity.IdentityStrategy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants