Groovy metaclass
问题 I have an existing class that extends a Number & implements Comparable, and I have been using this class extensively - including in my test classes (Junit & Spock). I have also been comparing instances of this class using == operator in the test classes. As I understand it, Groovy will not use .equals() for comparison of classes which implements Comparable. Furthermore, after trawling Groovy code, I also found out that my class will be compared using Integer (hence losing decimal points, etc)