You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Comparison predicates are predicates which do some form of comparison between the results of two expressions and return a BOOL. They take an operator, a left expression, and a right expression, and return the result of invoking the operator with the results of evaluating the expressions.
Copy file name to clipboardExpand all lines: Foundation/NSCompoundPredicate.swift
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -10,38 +10,38 @@
10
10
11
11
// Compound predicates are predicates which act on the results of evaluating other operators. We provide the basic boolean operators: AND, OR, and NOT.
Copy file name to clipboardExpand all lines: Foundation/NSExpression.swift
+13-17Lines changed: 13 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -50,14 +50,13 @@ open class NSExpression : NSObject, NSSecureCoding, NSCopying {
50
50
NSUnimplemented()
51
51
}
52
52
53
-
public /*not inherited*/ init(format expressionFormat:String, argumentArray arguments:[Any]){NSUnimplemented()}
54
-
public /*not inherited*/ init(format expressionFormat:String, arguments argList:CVaListPointer){NSUnimplemented()}
53
+
public /*not inherited*/ init(format expressionFormat:String, argumentArray arguments:[AnyObject]){NSUnimplemented()}
55
54
56
-
public /*not inherited*/ init(forConstantValue obj:Any?){NSUnimplemented()} // Expression that returns a constant value
55
+
public /*not inherited*/ init(forConstantValue obj:AnyObject?){NSUnimplemented()} // Expression that returns a constant value
57
56
openclassfunc expressionForEvaluatedObject()->NSExpression{NSUnimplemented()} // Expression that returns the object being evaluated
58
57
public /*not inherited*/ init(forVariable string:String){NSUnimplemented()} // Expression that pulls a value from the variable bindings dictionary
59
58
public /*not inherited*/ init(forKeyPath keyPath:String){NSUnimplemented()} // Expression that invokes valueForKeyPath with keyPath
60
-
public /*not inherited*/ init(forFunction name:String, arguments parameters:[Any]){NSUnimplemented()} // Expression that invokes one of the predefined functions. Will throw immediately if the selector is bad; will throw at runtime if the parameters are incorrect.
59
+
public /*not inherited*/ init(forFunction name:String, arguments parameters:[AnyObject]){NSUnimplemented()} // Expression that invokes one of the predefined functions. Will throw immediately if the selector is bad; will throw at runtime if the parameters are incorrect.
@@ -99,43 +98,40 @@ open class NSExpression : NSObject, NSSecureCoding, NSCopying {
99
98
// two NSExpression instances representing CLLocations NSNumber
100
99
// length: an NSExpression instance representing a string NSNumber
101
100
102
-
public /*not inherited*/ init(forAggregate subexpressions:[Any]){NSUnimplemented()} // Expression that returns a collection containing the results of other expressions
101
+
public /*not inherited*/ init(forAggregate subexpressions:[AnyObject]){NSUnimplemented()} // Expression that returns a collection containing the results of other expressions
103
102
public /*not inherited*/ init(forUnionSet left:NSExpression, with right:NSExpression){NSUnimplemented()} // return an expression that will return the union of the collections expressed by left and right
104
103
public /*not inherited*/ init(forIntersectSet left:NSExpression, with right:NSExpression){NSUnimplemented()} // return an expression that will return the intersection of the collections expressed by left and right
105
104
public /*not inherited*/ init(forMinusSet left:NSExpression, with right:NSExpression){NSUnimplemented()} // return an expression that will return the disjunction of the collections expressed by left and right
106
-
public /*not inherited*/ init(forSubquery expression:NSExpression, usingIteratorVariable variable:String, predicate:Any){NSUnimplemented()} // Expression that filters a collection by storing elements in the collection in the variable variable and keeping the elements for which qualifer returns true; variable is used as a local variable, and will shadow any instances of variable in the bindings dictionary, the variable is removed or the old value replaced once evaluation completes
107
-
public /*not inherited*/ init(forFunction target:NSExpression, selectorName name:String, arguments parameters:[Any]?){NSUnimplemented()} // Expression that invokes the selector on target with parameters. Will throw at runtime if target does not implement selector or if parameters are wrong.
105
+
public /*not inherited*/ init(forSubquery expression:NSExpression, usingIteratorVariable variable:String, predicate:AnyObject){NSUnimplemented()} // Expression that filters a collection by storing elements in the collection in the variable variable and keeping the elements for which qualifer returns true; variable is used as a local variable, and will shadow any instances of variable in the bindings dictionary, the variable is removed or the old value replaced once evaluation completes
106
+
public /*not inherited*/ init(forFunction target:NSExpression, selectorName name:String, arguments parameters:[AnyObject]?){NSUnimplemented()} // Expression that invokes the selector on target with parameters. Will throw at runtime if target does not implement selector or if parameters are wrong.
public /*not inherited*/ init(block:@escaping(Any?,[Any],NSMutableDictionary?)->Any, arguments:[NSExpression]?){NSUnimplemented()} // Expression that invokes the block with the parameters; note that block expressions are not encodable or representable as parseable strings.
110
-
public /*not inherited*/ init(forConditional predicate:Any, trueExpression:NSExpression, falseExpression:NSExpression){NSUnimplemented()} // Expression that will return the result of trueExpression or falseExpression depending on the value of predicate
108
+
public /*not inherited*/ init(forBlock block:(AnyObject?,[AnyObject],NSMutableDictionary?)->AnyObject, arguments:[NSExpression]?){NSUnimplemented()} // Expression that invokes the block with the parameters; note that block expressions are not encodable or representable as parseable strings.
109
+
public /*not inherited*/ init(forConditional predicate:Predicate, trueExpression:NSExpression, falseExpression:NSExpression){NSUnimplemented()} // Expression that will return the result of trueExpression or falseExpression depending on the value of predicate
/*@NSCopying*/ openvaroperand:NSExpression{NSUnimplemented()} // the object on which the selector will be invoked (the result of evaluating a key path or one of the defined functions)
121
120
openvararguments:[NSExpression]?{NSUnimplemented()} // array of expressions which will be passed as parameters during invocation of the selector on the operand of a function expression
/*@NSCopying*/ openvarleft:NSExpression{NSUnimplemented()} // expression which represents the left side of a set expression
126
125
/*@NSCopying*/ openvarright:NSExpression{NSUnimplemented()} // expression which represents the right side of a set expression
127
126
128
127
/*@NSCopying*/ openvar`true`:NSExpression{NSUnimplemented()} // expression which will be evaluated if a conditional expression's predicate evaluates to true
129
128
/*@NSCopying*/ openvar`false`:NSExpression{NSUnimplemented()} // expression which will be evaluated if a conditional expression's predicate evaluates to false
// evaluate the expression using the object and bindings- note that context is mutable here and can be used by expressions to store temporary state for one predicate evaluation
0 commit comments