A HashMap
is to add, get, remove, ... objects indexed by a custom key of any type.
A HashSet
is to add elements, remove elements and check if elements are present by comparing their hashes.
So a HashMap contains the elements and a HashSet remembers their hashes.