Comparator
| src | 5 years ago | ||
| .gitignore | 5 years ago | ||
| README.md | 5 years ago | ||
| lombok.config | 5 years ago | ||
| pom.xml | 5 years ago | ||
Compare objects by annotated member variables. Non-annotated members will be ignored.
public class User {
@Comparable
private String name;
}
Instantiate
Comparator comparator = new Comparator(object1, object2);
Is Equal
boolean equal = comparator.isEqual()
Differences
List<Diff> diffs = comparator.compare();
Diff
A runtime ComparatorException will be thrown if two object of different classes are being compared.