| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/Foundation.framework |
| Availability | Available in Mac OS X v10.0 and later. |
| Companion guide | |
| Declared in | NSScriptWhoseTests.h |
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.
For AND and OR operations, an NSLogicalTest object is typically initialized with an array containing two or more NSSpecifierTest objects. isTrue—inherited from NSScriptWhoseTest—evaluates the array in a manner appropriate to the logical operation. For NOT operations, an NSLogicalTest object is initialized with only one NSSpecifierTest object; it simply reverses the Boolean outcome of the isTrue method.
You don’t normally subclass NSLogicalTest.
Returns an NSLogicalTest object initialized to perform an AND operation with the NSSpecifierTest objects in a given array.
- (id)initAndTestWithTests:(NSArray *)subTests
An array of NSSpecifierTest objects representing Boolean expressions.
An NSLogicalTest object initialized to perform an AND operation with the NSSpecifierTest objects in subTests.
NSScriptWhoseTests.hReturns an NSLogicalTest object initialized to perform a NOT operation on the given NSScriptWhoseTest object.
- (id)initNotTestWithTest:(NSScriptWhoseTest *)subTest
The NSScriptWhoseTest object to invert.
An NSLogicalTest object initialized to perform a NOT operation on subTest.
NSScriptWhoseTests.hReturns an NSLogicalTest object initialized to perform an OR operation with the NSSpecifierTest objects in a given array.
- (id)initOrTestWithTests:(NSArray *)subTests
An array of NSSpecifierTest objects representing Boolean expressions.
An NSLogicalTest object initialized to perform an OR operation with the NSSpecifierTest objects in subTests.
NSScriptWhoseTests.hLast updated: 2006-05-23