diff options
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCompoundPredicate.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCompoundPredicate.java | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCompoundPredicate.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCompoundPredicate.java new file mode 100644 index 0000000000..4fa28efabd --- /dev/null +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCompoundPredicate.java @@ -0,0 +1,42 @@ +package org.eclipse.swt.internal.cocoa; + +public class NSCompoundPredicate extends NSPredicate { + +public NSCompoundPredicate() { + super(); +} + +public NSCompoundPredicate(int id) { + super(id); +} + +public static NSPredicate andPredicateWithSubpredicates(NSArray subpredicates) { + int result = OS.objc_msgSend(OS.class_NSCompoundPredicate, OS.sel_andPredicateWithSubpredicates_1, subpredicates != null ? subpredicates.id : 0); + return result != 0 ? new NSPredicate(result) : null; +} + +public int compoundPredicateType() { + return OS.objc_msgSend(this.id, OS.sel_compoundPredicateType); +} + +public id initWithType(int type, NSArray subpredicates) { + int result = OS.objc_msgSend(this.id, OS.sel_initWithType_1subpredicates_1, type, subpredicates != null ? subpredicates.id : 0); + return result != 0 ? new id(result) : null; +} + +public static NSPredicate notPredicateWithSubpredicate(NSPredicate predicate) { + int result = OS.objc_msgSend(OS.class_NSCompoundPredicate, OS.sel_notPredicateWithSubpredicate_1, predicate != null ? predicate.id : 0); + return result != 0 ? new NSPredicate(result) : null; +} + +public static NSPredicate orPredicateWithSubpredicates(NSArray subpredicates) { + int result = OS.objc_msgSend(OS.class_NSCompoundPredicate, OS.sel_orPredicateWithSubpredicates_1, subpredicates != null ? subpredicates.id : 0); + return result != 0 ? new NSPredicate(result) : null; +} + +public NSArray subpredicates() { + int result = OS.objc_msgSend(this.id, OS.sel_subpredicates); + return result != 0 ? new NSArray(result) : null; +} + +} |