Class: NSComparisonPredicate

Inherits:
NSPredicate show all

Overview

NSComparisonPredicate is a subclass of NSPredicate that you use to compare expressions.

Class Method Summary (collapse)

Instance Method Summary (collapse)

Methods inherited from NSPredicate

#evaluateWithObject:, #evaluateWithObject:substitutionVariables:, #predicateFormat, predicateWithBlock:, predicateWithFormat:, predicateWithFormat:argumentArray:, predicateWithFormat:arguments:, #predicateWithSubstitutionVariables:, predicateWithValue:

Methods inherited from NSObject

#!, #!=, #!~, #, #==, #===, #=~, #Rational, #__callee__, #__method__, #__send__, #__type__, `, alloc, allocWithZone:, #autoContentAccessingProxy, autoload, autoload?, autorelease_pool, #awakeAfterUsingCoder:, binding, block_given?, caller, cancelPreviousPerformRequestsWithTarget:, cancelPreviousPerformRequestsWithTarget:selector:object:, catch, class, classFallbacksForKeyedArchiver, #classForCoder, #classForKeyedArchiver, classForKeyedUnarchiver, #clone, conformsToProtocol:, #copy, copyWithZone:, #dealloc, #define_singleton_method, description, display, #doesNotRecognizeSelector:, #dup, #enum_for, #eql?, #equal?, #extend, fail, #finalize, format, #forwardInvocation:, #forwardingTargetForSelector:, framework, #freeze, #frozen?, getpass, gets, global_variables, #init, initialize, #initialize_clone, #initialize_copy, #initialize_dup, #inspect, instanceMethodForSelector:, instanceMethodSignatureForSelector:, #instance_eval, #instance_exec, #instance_of?, #instance_variable_defined?, #instance_variable_get, #instance_variable_set, #instance_variables, instancesRespondToSelector:, isSubclassOfClass:, #is_a?, iterator?, #kind_of?, lambda, load, load_bridge_support_file, load_plist, local_variables, loop, #method, #methodForSelector:, #methodSignatureForSelector:, #methods, #mutableCopy, mutableCopyWithZone:, new, #nil?, open, p, #performSelector:onThread:withObject:waitUntilDone:, #performSelector:onThread:withObject:waitUntilDone:modes:, #performSelector:withObject:afterDelay:, #performSelector:withObject:afterDelay:inModes:, #performSelectorInBackground:withObject:, #performSelectorOnMainThread:withObject:waitUntilDone:, #performSelectorOnMainThread:withObject:waitUntilDone:modes:, print, printf, #private_methods, proc, #protected_methods, #public_method, #public_methods, #public_send, putc, puts, raise, rand, readline, readlines, #replacementObjectForCoder:, #replacementObjectForKeyedArchiver:, require, resolveClassMethod:, resolveInstanceMethod:, #respond_to?, #respond_to_missing?, select, #send, setVersion:, #singleton_methods, sprintf, srand, superclass, #taint, #tainted?, #tap, test, throw, #to_plist, #to_s, trace_var, trap, #trust, #untaint, untrace_var, #untrust, #untrusted?, version

Constructor Details

This class inherits a constructor from NSObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class NSObject

Class Method Details

+ (NSPredicate) predicateWithLeftExpression(lhs, rightExpression:rhs, customSelector:selector)

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

Parameters:

  • lhs (NSExpression)

    The left hand side expression.

  • rhs (NSExpression)

    The right hand side expression.

  • selector (Symbol)

    The selector to use for comparison. The method defined by the selector must take a single argument and return a BOOL value.

Returns:

  • (NSPredicate)

    A new predicate formed by combining the left and right expressions using selector.

+ (NSPredicate) predicateWithLeftExpression(lhs, rightExpression:rhs, modifier:modifier, type:type, options:options)

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

Parameters:

  • lhs (NSExpression)

    The left hand expression.

  • rhs (NSExpression)

    The right hand expression.

  • modifier (NSComparisonPredicateModifier)

    The modifier to apply.

  • type (NSPredicateOperatorType)

    The predicate operator type.

  • options (Integer)

    The options to apply (see “NSComparisonPredicate Options”). For no options, pass 0.

Returns:

  • (NSPredicate)

    A new predicate of type type formed by combining the given left and right expressions using the modifier and options.

Instance Method Details

- (NSComparisonPredicateModifier) comparisonPredicateModifier

Returns the comparison predicate modifier for the receiver. The default value is NSDirectPredicateModifier.

Returns:

  • (NSComparisonPredicateModifier)

    The comparison predicate modifier for the receiver.

- (Symbol) customSelector

Returns the selector for the receiver.

Returns:

  • (Symbol)

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

- (Object) initWithLeftExpression(lhs, rightExpression:rhs, customSelector:selector)

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

Parameters:

  • lhs (NSExpression)

    The left hand expression.

  • rhs (NSExpression)

    The right hand expression.

  • selector (Symbol)

    The selector to use. The method defined by the selector must take a single argument and return a BOOL value.

Returns:

  • (Object)

    The receiver, initialized by combining the left and right expressions using selector.

- (Object) initWithLeftExpression(lhs, rightExpression:rhs, modifier:modifier, type:type, options:options)

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

Parameters:

  • lhs (NSExpression)

    The left hand expression.

  • rhs (NSExpression)

    The right hand expression.

  • modifier (NSComparisonPredicateModifier)

    The modifier to apply.

  • type (NSPredicateOperatorType)

    The predicate operator type.

  • options (Integer)

    The options to apply (see “NSComparisonPredicate Options”). For no options, pass 0.

Returns:

  • (Object)

    The receiver, initialized to a predicate of type type formed by combining the left and right expressions using the modifier and options.

- (NSExpression) leftExpression

Returns the left expression for the receiver.

Returns:

  • (NSExpression)

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

- (Integer) options

Returns the options that are set for the receiver.

Returns:

  • (Integer)

    The options that are set for the receiver.

- (NSPredicateOperatorType) predicateOperatorType

Returns the predicate type for the receiver.

Returns:

  • (NSPredicateOperatorType)

    The predicate type for the receiver.

- (NSExpression) rightExpression

Returns the right expression for the receiver.

Returns:

  • (NSExpression)

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