Instance Method

isEqualToHashTable:

Returns a Boolean value that indicates whether a given hash table is equal to the receiving hash table.

Declaration

- (BOOL)isEqualToHashTable:(NSHashTable<ObjectType> *)other;

Parameters

other

The hash table with which to compare the receiving hash table.

Return Value

YES if the contents of other are equal to the contents of the receiving hash table, otherwise NO.

Discussion

Two hash tables have equal contents if they each have the same number of members and if each member of one hash table is present in the other.

The equality test used for members depends on the personality option selected. For instance, choosing the NSPointerFunctionsObjectPersonality option will use isEqual: to determine equality. See NSPointerFunctionsOptions for more information on personality options and their corresponding equality tests.

See Also

Comparing Hash Tables

- intersectHashTable:

Removes from the receiving hash table each element that isn’t a member of another given hash table.

- intersectsHashTable:

Returns a Boolean value that indicates whether a given hash table intersects with the receiving hash table.

- isSubsetOfHashTable:

Returns a Boolean value that indicates whether every element in the receiving hash table is also present in another given hash table.