Added overridden equals() method.
Added overridden hashCode() method.