Mac Developer Library

Developer

Foundation Framework Reference NSLogicalTest Class Reference

Options
Deployment Target:

On This Page
Language:

NSLogicalTest

Instances of this class perform logical operations of AND, OR, and NOT on Boolean expressions represented by NSSpecifierTest objects. These operators are equivalent to “&&”, “||”, and “!” in the C language. More...

Inheritance


Conforms To


Import Statement


import Foundation @import Foundation;

Availability


Available in OS X v10.0 and later.
  • Returns an NSLogicalTest object initialized to perform an AND operation with the NSSpecifierTest objects in a given array.

    Declaration

    Swift

    init(andTestWithTests subTests: [AnyObject]!)

    Objective-C

    - (instancetype)initAndTestWithTests:(NSArray *)subTests

    Parameters

    subTests

    An array of NSSpecifierTest objects representing Boolean expressions.

    Return Value

    An NSLogicalTest object initialized to perform an AND operation with the NSSpecifierTest objects in subTests.

    Import Statement

    import Foundation

    Availability

    Available in OS X v10.0 and later.

  • Returns an NSLogicalTest object initialized to perform a NOT operation on the given NSScriptWhoseTest object.

    Declaration

    Swift

    init(notTestWithTest subTest: NSScriptWhoseTest!)

    Objective-C

    - (instancetype)initNotTestWithTest:(NSScriptWhoseTest *)subTest

    Parameters

    subTest

    The NSScriptWhoseTest object to invert.

    Return Value

    An NSLogicalTest object initialized to perform a NOT operation on subTest.

    Import Statement

    import Foundation

    Availability

    Available in OS X v10.0 and later.

  • Returns an NSLogicalTest object initialized to perform an OR operation with the NSSpecifierTest objects in a given array.

    Declaration

    Swift

    init(orTestWithTests subTests: [AnyObject]!)

    Objective-C

    - (instancetype)initOrTestWithTests:(NSArray *)subTests

    Parameters

    subTests

    An array of NSSpecifierTest objects representing Boolean expressions.

    Return Value

    An NSLogicalTest object initialized to perform an OR operation with the NSSpecifierTest objects in subTests.

    Import Statement

    import Foundation

    Availability

    Available in OS X v10.0 and later.