<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSRuleEditor/PredicatePartKey",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@T@NSRuleEditorPredicatePartKey"
  },
  "title" : "NSRuleEditor.PredicatePartKey"
}
-->

# NSRuleEditor.PredicatePartKey

These strings are used as keys to the dictionary returned from the delegate’s [`ruleEditor(_:predicatePartsForCriterion:withDisplayValue:inRow:)`](/documentation/AppKit/NSRuleEditorDelegate/ruleEditor(_:predicatePartsForCriterion:withDisplayValue:inRow:)) optional method. To construct a valid predicate, the union of the dictionaries for each item in the row must contain the required parts.

```
struct PredicatePartKey
```

## Topics

### Predicate Part Keys

[`static let comparisonModifier: NSRuleEditor.PredicatePartKey`](/documentation/AppKit/NSRuleEditor/PredicatePartKey/comparisonModifier)

The corresponding value is an `NSNumber` object representing a `NSComparisonPredicateModifier` constant the of the predicate.

[`static let compoundType: NSRuleEditor.PredicatePartKey`](/documentation/AppKit/NSRuleEditor/PredicatePartKey/compoundType)

The corresponding value is an `NSNumber` object representing a `NSCompoundPredicateType` constant.

[`static let customSelector: NSRuleEditor.PredicatePartKey`](/documentation/AppKit/NSRuleEditor/PredicatePartKey/customSelector)

The corresponding value is an `NSString` object representing a custom selector.

[`static let leftExpression: NSRuleEditor.PredicatePartKey`](/documentation/AppKit/NSRuleEditor/PredicatePartKey/leftExpression)

The corresponding value is an `NSExpression` object representing the left expression in the predicate.

[`static let operatorType: NSRuleEditor.PredicatePartKey`](/documentation/AppKit/NSRuleEditor/PredicatePartKey/operatorType)

The corresponding value is an `NSNumber` object representing a `NSPredicateOperatorType` constant.

[`static let options: NSRuleEditor.PredicatePartKey`](/documentation/AppKit/NSRuleEditor/PredicatePartKey/options)

The corresponding value is an `NSNumber` object representing an `NSComparisonPredicateOptions` bitfield.

[`static let rightExpression: NSRuleEditor.PredicatePartKey`](/documentation/AppKit/NSRuleEditor/PredicatePartKey/rightExpression)

The corresponding value is an `NSExpression` object representing the right expression in the predicate.

### Initializers

[`init(rawValue: String)`](/documentation/AppKit/NSRuleEditor/PredicatePartKey/init(rawValue:))

## Relationships

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

[`Sendable`](/documentation/Swift/Sendable)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`Hashable`](/documentation/Swift/Hashable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

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)