Add equals and hashcode methods

Signed-off-by: nigel <nigel.cook@hp.com>