Contents

NSLogicalTest

The logical combination of one or more specifier tests.

Declaration

class NSLogicalTest

Overview

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.

Topics

Initializing a logical test

Initializers

See Also

Object Matching Tests