I have a class that gives details about payment.The attributes are 

```
    accountNo, transactionAmount, dateOfTransaction.

```

Here I want to write hash function such that it will efficient when I store this class objects in a hashSet.

The main constraint is payment details should be unique(suppose a particular person should not pay fee two times in a month).

Can any one help me in hashCode to be written for this scenario and also equals method?