Platforms to show: All Mac Windows Linux Cross-Platform

NSComparisonPredicateMBS class

Superclass: NSPredicateMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
class iCloud MBS MacCloud Plugin 11.3 ✅ Yes ❌ No ❌ No ✅ Yes All
NSComparisonPredicateMBS is a subclass of NSPredicateMBS that you use to compare expressions.
Example
Var n1 as NSExpressionMBS = NSExpressionMBS.expressionForConstantValue(4)
Var n2 as NSExpressionMBS = NSExpressionMBS.expressionForConstantValue(9)

Var modifier as Integer = NSComparisonPredicateMBS.NSDirectPredicateModifier
Var type as Integer = NSComparisonPredicateMBS.NSGreaterThanPredicateOperatorType
Var options as Integer = 0

Var c as new NSComparisonPredicateMBS(n1, n2, Modifier, type, options)

MessageBox c.predicateFormat

You use comparison predicates to compare the results of two expressions. You create a comparison predicate with an operator, a left expression, and a right expression. You represent the expressions using instances of the NSExpressionMBS class. When you evaluate the predicate, it returns as a BOOL value the result of invoking the operator with the results of evaluating the expressions.
Subclass of the NSPredicateMBS class.

Modifier Type Constants

Constant Value Description
NSAllPredicateModifier 1 A predicate to compare all entries in the destination of a to-many relationship. more
NSAnyPredicateModifier 2 A predicate to match with any entry in the destination of a to-many relationship. more
NSDirectPredicateModifier 0 A predicate to compare directly the left and right hand sides.
Available in Mac OS X v10.4 and later.

Comparison Type Constants

Constant Value Description
NSBeginsWithPredicateOperatorType 8 A begins-with predicate.
Available in Mac OS X v10.4 and later.
NSBetweenPredicateOperatorType 100 A predicate to determine if the right hand side lies at or between bounds specified by the left hand side. more
NSContainsPredicateOperatorType 99 A predicate to determine if the left hand side contains the right hand side. more
NSCustomSelectorPredicateOperatorType 11 A predicate that uses a custom selector that takes a single argument and returns a BOOL value. more
NSEndsWithPredicateOperatorType 9 An ends-with predicate.
Available in Mac OS X v10.4 and later.
NSEqualToPredicateOperatorType 4 An equal-to predicate.
Available in Mac OS X v10.4 and later.
NSGreaterThanOrEqualToPredicateOperatorType 3 A greater-than-or-equal-to predicate.
Available in Mac OS X v10.4 and later.
NSGreaterThanPredicateOperatorType 2 A greater-than predicate.
Available in Mac OS X v10.4 and later.
NSInPredicateOperatorType 10 A predicate to determine if the left hand side is in the right hand side. more
NSLessThanOrEqualToPredicateOperatorType 1 A less-than-or-equal-to predicate.
Available in Mac OS X v10.4 and later.
NSLessThanPredicateOperatorType 0 A less-than predicate.
Available in Mac OS X v10.4 and later.
NSLikePredicateOperatorType 7 A simple subset of the MATCHES predicate, similar in behavior to SQL LIKE.
Available in Mac OS X v10.4 and later.
NSMatchesPredicateOperatorType 6 A full regular expression matching predicate.
Available in Mac OS X v10.4 and later.
NSNotEqualToPredicateOperatorType 5 A not-equal-to predicate.
Available in Mac OS X v10.4 and later.

String Comparison Types

Constant Value Description
NSCaseInsensitivePredicateOption 1 A case-insensitive predicate. more
NSDiacriticInsensitivePredicateOption 2 A diacritic-insensitive predicate. more
NSNormalizedPredicateOption 4 Indicates that the strings to be compared have been preprocessed. more

Superclass NSPredicateMBS

This class has no subclasses.

Blog Entries

Some related classes:


The items on this page are in the following plugins: MBS MacCloud Plugin.


NSComboBoxMBS   -   NSCompoundPredicateMBS


The biggest plugin in space...