Is the intention here to only allow one per type? And if there is already an existing type ignore it?

Because of the comparator in use the TreeSet will consider two items of the same type to be equal, so if there is already an item of the same type a new one cannot be added.