- Set & Map
A -- object/key exists in set/map
B -- object/key to be added to set/map
If and only if
(B == A || B.equals(A)) && B.hashCode == A.hashCode
then keyAdd will overwrite the existed one.
- List
Can add any object
Can add the same object more than one time
A -- object/key exists in set/map
B -- object/key to be added to set/map
If and only if
(B == A || B.equals(A)) && B.hashCode == A.hashCode
then keyAdd will overwrite the existed one.
- List
Can add any object
Can add the same object more than one time