+ predicateWithFormat:
+ predicateWithFormat:argumentArray:
+ predicateWithFormat:arguments:
- predicateWithSubstitutionVariables:
+ predicateWithValue:
+ predicateWithBlock:
+ predicateFromMetadataQueryString:
Availability 有効性
Technology
@interface NSPredicate : NSObject
Predicates represent logical conditions, which you can use to filter collections of objects. Although it’s common to create predicates directly from instances of NSComparison
, NSCompound
, and NSExpression
, you often create predicates from a format string that the class methods parse on NSPredicate
. Examples of predicate format strings include:
述部は論理条件を表します、それはあなたがオブジェクトのコレクションをフィルタするのに使用できます。普通は述部をNSComparison
、NSCompound
、そしてNSExpression
のインスタンスから直接に作成するとはいえ、あなたはしばしば述部それらをある書式設定文字列から作成します、それはクラスメソッドがNSPredicate
上で構文解析します。述部書式設定文字列の例は以下を含みます:
Simple comparisons, such as grade == “7”
or first
単純な比較、例えばgrade == “7”
またはfirst
Case- and diacritic-insensitive lookups, such as name contains[cd] “stein”
ケースおよび区別的発音符に配慮しない検索、例えばname contains[cd] “stein”
Logical operations, such as (first
論理演算、例えば(first
Temporal range constraints, such as date between {$YESTERDAY, $TOMORROW}
時を表す範囲の制約、例えばdate between {$YESTERDAY, $TOMORROW}
Relational conditions, such as group
関係条件、例えばgroup
Aggregate operations, such as @sum
集合演算、例えば@sum
For a complete syntax reference, refer to the Predicate Programming Guide. 完全な構文参照のために、Predicate Programming Guideを参照してください。
You can also create predicates that include variables using the evaluate
method so that you can predefine the predicate before substituting concrete values at runtime.
あなたはまた、変数を含む述部をevaluate
メソッドを使って作成できます、それであなたは、あらかじめ定義することが実行時に具体的な値で置き換える前に可能です。
+ predicateWithFormat:
+ predicateWithFormat:argumentArray:
+ predicateWithFormat:arguments:
- predicateWithSubstitutionVariables:
+ predicateWithValue:
+ predicateWithBlock:
+ predicateFromMetadataQueryString:
- evaluateWithObject:
- evaluateWithObject:substitutionVariables:
- allowEvaluation
predicateFormat
NSExpression
NSComparisonPredicate
NSCompoundPredicate