Mac Developer Library

Developer

Foundation Framework Reference NSSpecifierTest Class Reference

Options
Deployment Target:

On This Page
Language:

NSSpecifierTest

Instances of this class represent a Boolean expression; they evaluate an object specifier and compare the resulting object to another object using a given comparison method. For more information on NSSpecifierTest, see the method description for its sole public method, its initializer, initWithObjectSpecifier:comparisonOperator:testObject:. More...

Inheritance


Conforms To


Import Statement


import Foundation @import Foundation;

Availability


Available in OS X v10.0 and later.

Data Types

  • These are passed to initWithObjectSpecifier:comparisonOperator:testObject: to specify the comparison operator.

    Declaration

    Swift

    enum NSTestComparisonOperation : UInt { case EqualToComparison case LessThanOrEqualToComparison case LessThanComparison case GreaterThanOrEqualToComparison case GreaterThanComparison case BeginsWithComparison case EndsWithComparison case ContainsComparison }

    Objective-C

    typedef enum { NSEqualToComparison = 0, NSLessThanOrEqualToComparison, NSLessThanComparison, NSGreaterThanOrEqualToComparison, NSGreaterThanComparison, NSBeginsWithComparison, NSEndsWithComparison, NSContainsComparison } NSTestComparisonOperation;

    Constants

    • EqualToComparison

      NSEqualToComparison

      Binary comparison operator that results in YEStrue if the two objects are equal.

      Available in OS X v10.0 and later.

    • LessThanOrEqualToComparison

      NSLessThanOrEqualToComparison

      Binary comparison operator that results in YEStrue if the value of the test object is equal to or less than the value of the other object.

      Available in OS X v10.0 and later.

    • LessThanComparison

      NSLessThanComparison

      Binary comparison operator that results in YEStrue if the value of the test object is less than the value of the other object.

      Available in OS X v10.0 and later.

    • GreaterThanOrEqualToComparison

      NSGreaterThanOrEqualToComparison

      Binary comparison operator that results in YEStrue if the value of the test object is greater than or equal to the value of the other object.

      Available in OS X v10.0 and later.

    • GreaterThanComparison

      NSGreaterThanComparison

      Binary comparison operator that results in YEStrue if the value of the test object is greater than the value of the other object.

      Available in OS X v10.0 and later.

    • BeginsWithComparison

      NSBeginsWithComparison

      Binary containment operator that results in YEStrue if the test object is a list or string that matches the beginning of the other object (which is also a list or string).

      Available in OS X v10.0 and later.

    • EndsWithComparison

      NSEndsWithComparison

      Binary containment operator that results in YEStrue if the test object is a list or string that matches the end of the other object (which is also a list or string).

      Available in OS X v10.0 and later.

    • ContainsComparison

      NSContainsComparison

      Binary containment operator that results in YEStrue if the test object is a list or string that matches the other object (which is also a list or string) at any location.

      Available in OS X v10.0 and later.

    Import Statement

    import Foundation

    Availability

    Available in OS X v10.0 and later.