I have a function in one of my classes that compares itself with another instance of the same class - and finds out which variables differ. This is for the purpose of minimi
You can use Apache object utils
ObjectUtils.equals(Object object1, Object object2) -- Returns boolean
ObjectUtils.equals(Object object1, Object object2)
this method has been replaced by java.util.Objects.equals(Object, Object) in Java 7