---
title: "predicateForSamples(equalTo:)"
framework: healthkit
role: symbol
role_heading: Type Method
path: "healthkit/hkcategoryvaluepredicateproviding/predicateforsamples(equalto:)"
---

# predicateForSamples(equalTo:)

Returns a predicate that checks whether a category sample is equal to the provided set of values.

## Declaration

```swift
static func predicateForSamples(equalTo values: Set<Self>) -> NSPredicate
```

## Parameters

- `values`: The target set of values.

## See Also

### Creating predicates

- [predicateForSamples(_:value:)](healthkit/hkcategoryvaluepredicateproviding/predicateforsamples(_:value:).md)
