Adds implementation of hashCode, equals and toString methods.