Also use equality method if the object implements comparable

Change-Id: I224b5569b62fdd2d788b57f59333c6256686d4b2
Merge "Also use equality method if the object implements comparable"