![]() |
API
0.9.6
|
CPComparisonPredicate is a subclass of CPPredicate used to compare expressions. More...
#import <CPComparisonPredicate.h>
Class Methods | |
(CPPredicate) | + predicateWithLeftExpression:rightExpression:customSelector: |
(CPPredicate) | + predicateWithLeftExpression:rightExpression:modifier:type:options: |
![]() | |
(CPPredicate) | + predicateWithFormat: |
(CPPredicate) | + predicateWithFormat:argumentArray: |
(CPPredicate) | + predicateWithFormat:arguments: |
(CPPredicate) | + predicateWithValue: |
![]() | |
(BOOL) | + accessInstanceVariablesDirectly |
(id) | + alloc |
(id) | + allocWithCoder: |
(BOOL) | + automaticallyNotifiesObserversForKey: |
(Class) | + class |
(void) | + exposeBinding: |
(void) | + initialize |
(IMP) | + instanceMethodForSelector: |
(BOOL) | + instancesRespondToSelector: |
(BOOL) | + isSubclassOfClass: |
(CPSet) | + keyPathsForValuesAffectingValueForKey: |
(void) | + load |
(id) | + new |
(void) | + setVersion: |
(Class) | + superclass |
(int) | + version |
Additional Inherited Members | |
![]() | |
Class | isa |
CPComparisonPredicate is a subclass of CPPredicate used to compare expressions.
A predicate to directly compare the left and right hand sides.
A predicate to compare all entries in the destination of a to-many relationship.
The left hand side must be a collection. The corresponding predicate compares each value in the left hand side with the right hand side, and returns NO when it finds the first mismatch—or YES if all match.
A predicate to match with any entry in the destination of a to-many relationship.
The left hand side must be a collection. The corresponding predicate compares each value in the left hand side against the right hand side and returns YES when it finds the first match—or NO if no match is found.
A case-insensitive predicate.
A diacritic-insensitive predicate.
A less-than predicate.
A less-than-or-equal-to predicate.
A greater-than predicate.
A greater-than-or-equal-to predicate.
An equal-to predicate.
A not-equal-to predicate.
A full regular expression matching predicate.
A simple subset of the matches predicate, similar in behavior to SQL LIKE.
A begins-with predicate.
An ends-with predicate.
A predicate to determine if the left hand side is in the right hand side.
For strings, returns YES if the left hand side is a substring of the right hand side. For collections, returns YES if the left hand side is in the right hand side.
Predicate that uses a custom selector that takes a single argument and returns a BOOL value.
The selector is invoked on the left hand side with the right hand side.
A predicate to determine if the left hand side contains the right hand side.
Returns YES if [lhs contains rhs]; the left hand side must be a CPExpression object that evaluates to a collection
A predicate to determine if the right hand side lies between bounds specified by the left hand side.
Returns YES if [lhs between rhs]; the right hand side must be an array in which the first element sets the lower bound and the second element the upper, inclusive. Comparison is performed using compare: or the class-appropriate equivalent.
Comparison predicates are predicates used to compare the results of two expressions. Comparison predicates take an operator, a left expression, and a right expression, and return as a BOOL the result of invoking the operator with the results of evaluating the expressions. Expressions are represented by instances of the CPExpression class.
Definition at line 2 of file CPComparisonPredicate.h.
|
implementation |
Returns the comparison predicate modifier for the receiver.
Definition at line 265 of file CPComparisonPredicate.j.
|
implementation |
Returns the selector for the receiver.
Definition at line 274 of file CPComparisonPredicate.j.
|
implementation |
Provided by category CPComparisonPredicate(CPCoding).
Definition at line 541 of file CPComparisonPredicate.j.
|
implementation |
Returns a Boolean value that indicates whether a given object matches the conditions specified by the receiver.
object | The object against which to evaluate the receiver. |
Reimplemented from CPPredicate.
Definition at line 488 of file CPComparisonPredicate.j.
|
implementation |
Returns a Boolean value that indicates whether a given object matches the conditions specified by the receiver after substituting in the values in a given variables dictionary.
object | The object against which to evaluate the receiver. |
variables | The substitution variables dictionary. The dictionary must contain key-value pairs for all variables in the receiver. |
Reimplemented from CPPredicate.
Definition at line 493 of file CPComparisonPredicate.j.
|
implementation |
Provided by category CPComparisonPredicate(CPCoding).
Definition at line 525 of file CPComparisonPredicate.j.
|
implementation |
Initializes a predicate formed by combining given left and right expressions using a given selector.
left | The left hand side expression. |
right | The right hand side expression. |
selector | The selector to use for comparison. The method defined by the selector must take a single argument and return a BOOL value. |
Definition at line 211 of file CPComparisonPredicate.j.
|
implementation |
Initializes a predicate to a given type formed by combining given left and right expressions using a given modifier and options.
left | The left hand expression. |
right | The right hand expression. |
modifier | The modifier to apply. |
type | The predicate operator type. |
options | The options to apply (see CPComparisonPredicate Options). |
Definition at line 237 of file CPComparisonPredicate.j.
|
implementation |
Determines if anObject
is functionally equivalent to the receiver.
YES
if anObject
is functionally equivalent to the receiver. Reimplemented from CPObject.
Definition at line 394 of file CPComparisonPredicate.j.
|
implementation |
Returns the left expression for the receiver.
Definition at line 283 of file CPComparisonPredicate.j.
|
implementation |
Returns the options that are set for the receiver.
Definition at line 292 of file CPComparisonPredicate.j.
|
implementation |
Returns the receiver’s format string.
Reimplemented from CPPredicate.
Definition at line 315 of file CPComparisonPredicate.j.
|
implementation |
Returns the predicate type for the receiver.
Definition at line 301 of file CPComparisonPredicate.j.
|
implementation |
Returns a new predicate formed by combining the left and right expressions using a given selector.
left | The left hand side expression. |
right | The right hand side expression. |
selector | The selector to use for comparison. The method defined by the selector must take a single argument and return a BOOL value. |
Definition at line 185 of file CPComparisonPredicate.j.
|
implementation |
Creates and returns a predicate of a given type formed by combining given left and right expressions using a given modifier and options.
left | The left hand expression. |
right | The right hand expression. |
modifier | The modifier to apply. |
type | The predicate operator type. |
options | The options to apply (see CPComparisonPredicate Options). |
Definition at line 199 of file CPComparisonPredicate.j.
|
implementation |
Returns a copy of the receiver with the receiver’s variables substituted by values specified in a given substitution variables dictionary.
variables | The substitution variables dictionary. The dictionary must contain key-value pairs for all variables in the receiver. |
Reimplemented from CPPredicate.
Definition at line 383 of file CPComparisonPredicate.j.
|
implementation |
Returns the right expression for the receiver.
Definition at line 310 of file CPComparisonPredicate.j.