Implements equals() method

Implements equals() method