<!--
{
  "availability" : [
    "iOS: 6.0.0 -",
    "iPadOS: 6.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.5.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSHashTable/isSubset(of:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSHashTable(im)isSubsetOfHashTable:"
  },
  "title" : "isSubset(of:)"
}
-->

# isSubset(of:)

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

```
func isSubset(of other: NSHashTable<ObjectType>) -> Bool
```

## Parameters

`other`

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

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if every element in the receiving hash table is also present in `other`, otherwise <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

The equality test used for members depends on the personality option selected. For instance, choosing the [`objectPersonality`](/documentation/Foundation/NSPointerFunctions/Options/objectPersonality) option will use `isEqual:` to determine equality. See [`NSPointerFunctions.Options`](/documentation/Foundation/NSPointerFunctions/Options) for more information on personality options and their corresponding equality tests.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)