Converts call if compareTo method to call of equals method.