---
title: "predicateForStatesOfMind(withValence:operatorType:)"
framework: healthkit
role: symbol
role_heading: Type Method
path: "healthkit/hkquery/predicateforstatesofmind(withvalence:operatortype:)"
---

# predicateForStatesOfMind(withValence:operatorType:)

## Declaration

```swift
class func predicateForStatesOfMind(withValence valence: Double, operatorType: NSComparisonPredicate.Operator) -> NSPredicate
```
