Skip to content

Glossary: Data Structures and Algorithms in Java

hashable

Also written: good key

Usable as a HashMap key or HashSet item because its `hashCode` and `equals` agree and its fields never change. Strings, numbers and records of those qualify; lists are risky.

Where the book teaches it

Related terms

hashCodeequalsimmutablerecord