Class

NSComparison​Predicate

NSComparison​Predicate is a subclass of NSPredicate that you use to compare expressions.

Overview

You use comparison predicates to compare the results of two expressions. You create a comparison predicate with an operator, a left expression, and a right expression. You represent the expressions using instances of the NSExpression class. When you evaluate the predicate, it returns as a BOOL value the result of invoking the operator with the results of evaluating the expressions.

Nested Types

NSComparison​Predicate.Operator

Defines the type of comparison for NSComparison​Predicate.

NSComparison​Predicate.Modifier

These constants describe the possible types of modifier for NSComparison​Predicate.

NSComparison​Predicate.Options

These constants describe the possible types of string comparison for NSComparison​Predicate. These options are supported for LIKE as well as all of the equality/comparison operators.

Symbols

Creating Comparison Predicates

init(left​Expression:​ NSExpression, right​Expression:​ NSExpression, custom​Selector:​ Selector)

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

Getting Information About a Comparison Predicate

var comparison​Predicate​Modifier:​ NSComparison​Predicate.Modifier

The comparison predicate modifier for the receiver.

var custom​Selector:​ Selector?

The selector for the receiver.

var right​Expression:​ NSExpression

The right expression for the receiver.

var left​Expression:​ NSExpression

The left expression for the receiver.

var options:​ NSComparison​Predicate.Options

The options that are set for the receiver.

Constants

NSComparison​Predicate.Modifier

These constants describe the possible types of modifier for NSComparison​Predicate.

NSComparison​Predicate.Options

These constants describe the possible types of string comparison for NSComparison​Predicate. These options are supported for LIKE as well as all of the equality/comparison operators.

NSComparison​Predicate.Operator

Defines the type of comparison for NSComparison​Predicate.

Relationships

Inherits From