Everyone knows HashSet
stores elements in buckets based on the size of the hashtable and the elements' hash code values.
But how does CopyOnWriteArraySet
store elements? I thought it makes a snapshot of those buckets and copies them. Looks like it doesn't. Does it store them in 'normal' array 1 by 1 and checks equals()
?
Does it even use hashing principle?