When two objects have the same hashValue, they are considered equal.
Understanding Collections Types in Swift Part 3 — Making Your Own Classes Collections
Keith Elliott

Not quite. Two objects, which are equal, must produce the same hash value. But two objects with the same hash value need not necessarily be equal (hence hash collisions in maps / sets and the not quite O(1) lookup complexity).

Like what you read? Give Bruce Gilmour a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.