Implement toString() for HashTable.