/* NSCompoundPredicate.h Copyright (c) 2004-2019, Apple Inc. All rights reserved. */ #import @class NSArray; NS_HEADER_AUDIT_BEGIN(nullability, sendability) // Compound predicates are predicates which act on the results of evaluating other operators. We provide the basic boolean operators: AND, OR, and NOT. typedef NS_ENUM(NSUInteger, NSCompoundPredicateType) { NSNotPredicateType = 0, NSAndPredicateType, NSOrPredicateType, }; API_AVAILABLE(macos(10.4), ios(3.0), watchos(2.0), tvos(9.0)) @interface NSCompoundPredicate : NSPredicate - (instancetype)initWithType:(NSCompoundPredicateType)type subpredicates:(NSArray *)subpredicates NS_DESIGNATED_INITIALIZER; - (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER; @property (readonly) NSCompoundPredicateType compoundPredicateType; @property (readonly, copy) NSArray *subpredicates; /*** Convenience Methods ***/ + (NSCompoundPredicate *)andPredicateWithSubpredicates:(NSArray *)subpredicates NS_SWIFT_NAME(init(andPredicateWithSubpredicates:)); + (NSCompoundPredicate *)orPredicateWithSubpredicates:(NSArray *)subpredicates NS_SWIFT_NAME(init(orPredicateWithSubpredicates:)); + (NSCompoundPredicate *)notPredicateWithSubpredicate:(NSPredicate *)predicate NS_SWIFT_NAME(init(notPredicateWithSubpredicate:)); @end NS_HEADER_AUDIT_END(nullability, sendability)