Compare objects by annotated member variables. Non-annotated members will be ignored.
public class User {
@Comparable
private String name;
}
Instantiate
Comparator comparator = new Comparator<T>(object1, object2);
Is Equal
boolean equal = comparator.isEqual()
Differences
List<Diff> diffs = comparator.compare();
Diff
Objects other than boxed types and Strings can be marked as @Comparable.
public class User {
@Comparable
private Address address;
}
public class Address {
@Comparable
private String city;
private String state;
}
Add iterable handling