- Inherits from:
- BDQualifier
- NSObject
- Conforms to:
- BDQualifierEvaluation
- NSCoding
- Declared in:
- BDControl/BDKeyValueQualifier.h
A BDKeyValueQualifier compares the value of an attribute of the object the qualifier is evaluated against with a static value. The value may be a variable.
To compare an attribute of an object against a value, a BDKeyValueQualifier is used. Instances of BDKeyValueQualifier use the standard BDQualifier comparison selectors to perform comparisons.
The value the attribute is compared against may be another object, a null object, or a variable. If the value is a null object (either nil
or an instance of NSNull), the only applicable comparison selectors are BDQualifierOperatorEqual
and BDQualifierOperatorNotEqual
.
If the value is a variable, the qualifier can't be evaluated directly; it must be sent -qualifierWithBindings:requiresAllVariables:
to get a qualifier that can be evaluated. -qualifierWithBindings:requiresAllVariables:
may throw an exception if all variables are required to be bound and a variable could not be found in the bindings dictionary passed to the method. If not all variables are required to be bound, and the binding for a variable isn't found, it may return nil
to indicate that the qualifier cannot be evaluated.
- BDQualifierEvaluation
- -evaluateWithObject:
- NSCoding
- -encodeWithCoder:
- -initWithCoder:
- Initialization
- -initWithKey:operatorSelector:value:
- Accessors
- -key
- -operatorSelector
- -value
- (id)initWithKey:(NSString *)key operatorSelector:(SEL)operatorSelector value:(id)value
Initializes an instance of BDKeyValueQualifier with the key and value to compare and the comparison operation to use.
- (NSString *)key
Returns the key.
- (SEL)operatorSelector
Returns the selector used to compare the value of the key and the specified value when the qualifier is evaluated.
- (id)value
Returns the value to compare against.