Implement Has and Equals methods.