API  0.9.10
CPComparisonPredicate Class Reference

CPComparisonPredicate is a subclass of CPPredicate used to compare expressions. More...

#import <CPComparisonPredicate.h>

+ Inheritance diagram for CPComparisonPredicate:

Instance Methods

(CPComparisonPredicateModifier) - comparisonPredicateModifier
 
(SEL) - customSelector
 
(void) - encodeWithCoder:
 
(BOOL) - evaluateWithObject:
 
(BOOL) - evaluateWithObject:substitutionVariables:
 
(id) - initWithCoder:
 
(id) - initWithLeftExpression:rightExpression:customSelector:
 
(id) - initWithLeftExpression:rightExpression:modifier:type:options:
 
(BOOL) - isEqual:
 
(CPExpression) - leftExpression
 
(unsigned) - options
 
(CPString- predicateFormat
 
(CPPredicateOperatorType) - predicateOperatorType
 
(CPPredicate) - predicateWithSubstitutionVariables:
 
(CPExpression) - rightExpression
 

Class Methods

(CPPredicate) + predicateWithLeftExpression:rightExpression:customSelector:
 
(CPPredicate) + predicateWithLeftExpression:rightExpression:modifier:type:options:
 

Detailed Description

CPComparisonPredicate is a subclass of CPPredicate used to compare expressions.

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.

Method Documentation

◆ comparisonPredicateModifier()

- (CPComparisonPredicateModifier) comparisonPredicateModifier
implementation

Returns the comparison predicate modifier for the receiver.

Returns
The comparison predicate modifier for the receiver.

Definition at line 136 of file CPComparisonPredicate.j.

◆ customSelector()

- (SEL) customSelector
implementation

Returns the selector for the receiver.

Returns
The selector for the receiver, or NULL if there is none.

Definition at line 145 of file CPComparisonPredicate.j.

◆ encodeWithCoder:()

- (void) encodeWithCoder: (CPCoder coder
implementation

Provided by category CPComparisonPredicate(CPCoding).

Definition at line 415 of file CPComparisonPredicate.j.

◆ evaluateWithObject:()

- (BOOL) evaluateWithObject: (id)  object
implementation

Definition at line 359 of file CPComparisonPredicate.j.

◆ evaluateWithObject:substitutionVariables:()

- (BOOL) evaluateWithObject: (id)  object
substitutionVariables: (CPDictionary variables 
implementation

Definition at line 364 of file CPComparisonPredicate.j.

◆ initWithCoder:()

- (id) initWithCoder: (CPCoder coder
implementation

Provided by category CPComparisonPredicate(CPCoding).

Definition at line 399 of file CPComparisonPredicate.j.

◆ initWithLeftExpression:rightExpression:customSelector:()

- (id) initWithLeftExpression: (CPExpression)  left
rightExpression: (CPExpression)  right
customSelector: (SEL)  selector 
implementation

Initializes a predicate formed by combining given left and right expressions using a given selector.

Parameters
leftThe left hand side expression.
rightThe right hand side expression.
selectorThe selector to use for comparison. The method defined by the selector must take a single argument and return a BOOL value.
Returns
The receiver, initialized by combining the left and right expressions using selector.

Definition at line 82 of file CPComparisonPredicate.j.

◆ initWithLeftExpression:rightExpression:modifier:type:options:()

- (id) initWithLeftExpression: (CPExpression)  left
rightExpression: (CPExpression)  right
modifier: (CPComparisonPredicateModifier)  modifier
type: (CPPredicateOperatorType)  type
options: (unsigned)  options 
implementation

Initializes a predicate to a given type formed by combining given left and right expressions using a given modifier and options.

Parameters
leftThe left hand expression.
rightThe right hand expression.
modifierThe modifier to apply.
typeThe predicate operator type.
optionsThe options to apply (see CPComparisonPredicate Options).
Returns
The receiver, initialized to a predicate of type type formed by combining the left and right expressions using the modifier and options.

Definition at line 108 of file CPComparisonPredicate.j.

◆ isEqual:()

- (BOOL) isEqual: (id)  anObject
implementation

Definition at line 265 of file CPComparisonPredicate.j.

◆ leftExpression()

- (CPExpression) leftExpression
implementation

Returns the left expression for the receiver.

Returns
The left expression for the receiver, or nil if there is none.

Definition at line 154 of file CPComparisonPredicate.j.

◆ options()

- (unsigned) options
implementation

Returns the options that are set for the receiver.

Returns
The options that are set for the receiver.

Definition at line 163 of file CPComparisonPredicate.j.

◆ predicateFormat()

- (CPString) predicateFormat
implementation

Definition at line 186 of file CPComparisonPredicate.j.

◆ predicateOperatorType()

- (CPPredicateOperatorType) predicateOperatorType
implementation

Returns the predicate type for the receiver.

Returns
Returns the predicate type for the receiver.

Definition at line 172 of file CPComparisonPredicate.j.

◆ predicateWithLeftExpression:rightExpression:customSelector:()

+ (CPPredicate) predicateWithLeftExpression: (CPExpression)  left
rightExpression: (CPExpression)  right
customSelector: (SEL)  selector 
implementation

Returns a new predicate formed by combining the left and right expressions using a given selector.

Parameters
leftThe left hand side expression.
rightThe right hand side expression.
selectorThe selector to use for comparison. The method defined by the selector must take a single argument and return a BOOL value.
Returns
A new predicate formed by combining the left and right expressions using selector.

Definition at line 56 of file CPComparisonPredicate.j.

◆ predicateWithLeftExpression:rightExpression:modifier:type:options:()

+ (CPPredicate) predicateWithLeftExpression: (CPExpression)  left
rightExpression: (CPExpression)  right
modifier: (CPComparisonPredicateModifier)  modifier
type: (int)  type
options: (unsigned)  options 
implementation

Creates and returns a predicate of a given type formed by combining given left and right expressions using a given modifier and options.

Parameters
leftThe left hand expression.
rightThe right hand expression.
modifierThe modifier to apply.
typeThe predicate operator type.
optionsThe options to apply (see CPComparisonPredicate Options).
Returns
A new predicate of type type formed by combining the given left and right expressions using the modifier and options.

Definition at line 70 of file CPComparisonPredicate.j.

◆ predicateWithSubstitutionVariables:()

- (CPPredicate) predicateWithSubstitutionVariables: (CPDictionary variables
implementation

Definition at line 254 of file CPComparisonPredicate.j.

◆ rightExpression()

- (CPExpression) rightExpression
implementation

Returns the right expression for the receiver.

Returns
The right expression for the receiver, or nil if there is none.

Definition at line 181 of file CPComparisonPredicate.j.


The documentation for this class was generated from the following files: