Newer Version Available
Sets of Objects
Sets can contain sObjects among other types of elements.
Sets contain unique elements. Uniqueness of sObjects is determined
by comparing the objects’ fields. For example, if you try to
add two accounts with the same name to a set, with no other fields
set, only one sObject is added to the set.
If you add a description to one of the accounts, it is considered
unique and both accounts are added to the set.