added hashcode & equals in preparation of queue optimising code.