Previous: HashedCollection-storing, Up: HashedCollection

1.85.10 HashedCollection: testing collections

= aHashedCollection
Returns true if the two sets have the same membership, false if not

Answer how many elements the receiver can hold before having to grow.

Return the hash code for the members of the set. Since order is unimportant, we use a commutative operator to compute the hash value.

includes: anObject
Answer whether the receiver contains an instance of anObject.

Answer whether the receiver is empty.

occurrencesOf: anObject
Return the number of occurrences of anObject. Since we're a set, this is either 0 or 1. Nil is never directly in the set, so we special case it (the result is always 1).

Answer the receiver's size