Documentation Archive Developer
Search

Value Class Additions (NSObject)

Inherits From:
none (NSObject is a root class)

Declared in: EOControl/EOQualifier.h
EOControl/EOSortOrdering.h

Class Description

Enterprise Objects Framework adds several methods to NSObject for comparing values. Though declared for NSObject, most of these methods work properly only with value classes: NSString, NSDate, NSNumber, NSDecimalNumber, and EONull. These methods are used for sorting and for evaluating qualifiers in memory.

Sorting value objects
- compareAscending:
- compareCaseInsensitiveAscending:
- compareCaseInsensitiveDescending:
- compareDescending:
Testing value objects
- doesContain:
- isEqualTo:
- isGreaterThan:
- isGreaterThanOrEqualTo:
- isLessThan:
- isLessThanOrEqualTo:
- isLike:
- isCaseInsensitiveLike:
- isNotEqualTo:

Instance Methods

compareAscending:

- (NSComparisonResult)compareAscending: (id)anObject

Returns NSOrderedAscending if anObject is naturally ordered after the receiver, NSOrderedDescending if it's naturally ordered before the receiver, and NSOrderedSame if they're equivalent for ordering purposes. NSObject's implementation of this method simply invokes compare: .

See also: - compareDescending: , - compareCaseInsensitiveAscending: , - compareCaseInsensitiveDescending:

compareCaseInsensitiveAscending:

- (NSComparisonResult)compareCaseInsensitiveAscending: (id)anObject

Returns NSOrderedAscending if anObject is naturally ordered-ignoring case-after the receiver, NSOrderedDescending if it's naturally ordered before the receiver, and NSOrderedSame if they're equivalent for ordering purposes. NSObject's implementation of this method invokes compare: , while NSString's invokes caseInsensitiveCompare: .

See also: - compareCaseInsensitiveDescending: , - compareAscending: , - compareDescending:

compareCaseInsensitiveDescending:

- (NSComparisonResult)compareCaseInsensitiveDescending: (id)anObject

Returns NSOrderedAscending if anObject is naturally ordered-ignoring case-before the receiver, NSOrderedDescending if it's naturally ordered after the receiver, and NSOrderedSame if they're equivalent for ordering purposes. NSObject's implementation of this method invokes compare: and inverts the result, while NSString's invokes caseInsensitiveCompare: and inverts the result.

See also: - compareCaseInsensitiveAscending: , - compareDescending: , - compareAscending:

compareDescending:

- (NSComparisonResult)compareDescending: (id)anObject

Returns NSOrderedAscending if anObject is naturally ordered before the receiver, NSOrderedDescending if it's naturally ordered after the receiver, and NSOrderedSame if they're equivalent for ordering purposes. NSObject's implementation of this method simply invokes compare: and inverts the result.

See also: - compareAscending: , - compareCaseInsensitiveDescending: , - compareCaseInsensitiveAscending:

doesContain:

- (BOOL)doesContain: (id)anObject

Returns YES if the receiver contains anObject, NO if it doesn't. NSObject's implementation of this method returns YES only if the receiver is a kind of NSArray and contains anObject. In all other cases it returns NO. This method is used in the Framework only by EOQualifier for in-memory evaluation.

isCaseInsensitiveLike:

- (BOOL)isCaseInsensitiveLike:(NSString *)anObject

Returns YES if the receiver is a case-insensitive match for aString, NO if it isn't. See "Using Wildcards" in the EOQualifier class specification for the wildcard characters allowed. NSObject's implementation returns NO; NSString's performs a proper case-insensitive comparison. This method is used in the Framework only by EOQualifier for in-memory evaluation.

See also: - isLike: , - doesContain: , - isEqualTo: , - isGreaterThan: , - isGreaterThanOrEqualTo: , - isLessThan: , - isLessThanOrEqualTo: ,- isNotEqualTo:

isEqualTo:

- (BOOL)isEqualTo: (id)anObject

Invokes isEqual: and returns the result. This method is used in the Framework only by EOQualifier for in-memory evaluation.

See also: - doesContain: , - isGreaterThan: , - isGreaterThanOrEqualTo: , - isLessThan: , - isLessThanOrEqualTo: , - isLike: , - isCaseInsensitiveLike: , - isNotEqualTo:

isGreaterThan:

- (BOOL)isGreaterThan: (id)anObject

Invokes compare: and returns YES if the result is NSOrderedDescending. This method is used in the Framework only by EOQualifier for in-memory evaluation.

See also: - doesContain: , - isEqualTo: , - isGreaterThanOrEqualTo: , - isLessThan: , - isLessThanOrEqualTo: , - isLike: , - isCaseInsensitiveLike: , - isNotEqualTo:

isGreaterThanOrEqualTo:

- (BOOL)isGreaterThanOrEqualTo: (id)anObject

Invokes compare: and returns YES if the result is NSOrderedDescending or NSOrderedSame. This method is used in the Framework only by EOQualifier for in-memory evaluation.

See also: - doesContain: , - isEqualTo: , - isGreaterThan: , - isLessThan: , - isLessThanOrEqualTo: , - isLike: , - isCaseInsensitiveLike: , - isNotEqualTo:

isLessThan:

- (BOOL)isLessThan: (id)anObject

Invokes compare: and returns YES if the result is NSOrderedAscending. This method is used in the Framework only by EOQualifier for in-memory evaluation.

See also: - doesContain: , - isEqualTo: , - isGreaterThan: , - isGreaterThanOrEqualTo: , - isLessThanOrEqualTo: , - isLike: , - isCaseInsensitiveLike: , - isNotEqualTo:

isLessThanOrEqualTo:

- (BOOL)isLessThanOrEqualTo: (id)anObject

Invokes compare: and returns YES if the result is NSOrderedAscending or NSOrderedSame. This method is used in the Framework only by EOQualifier for in-memory evaluation.

See also: - doesContain: , - isEqualTo: , - isGreaterThan: , - isGreaterThanOrEqualTo: , - isLessThan: , - isLike: , - isCaseInsensitiveLike: , - isNotEqualTo:

isLike:

- (BOOL)isLike: (NSString *)aString

Returns YES if the receiver matches aString according to the semantics of the SQL like comparison operator, NO if it doesn't. See "Using Wildcards" in the EOQualifier class specification for the wildcard characters allowed. NSObject's implementation returns NO; NSString's performs a proper comparison. This method is used in the Framework only by EOQualifier for in-memory evaluation.

See also: - isCaseInsensitiveLike: , - doesContain: , - isEqualTo: , - isGreaterThan: , - isGreaterThanOrEqualTo: , - isLessThan: , - isLessThanOrEqualTo: , - isNotEqualTo:

isNotEqualTo:

- (BOOL)isNotEqualTo: (id)anObject

Invokes isEqual: , inverts the result, and returns it. This method is used in the Framework only by EOQualifier for in-memory evaluation.

See also: - doesContain: , - isEqualTo: , - isGreaterThan: , - isGreaterThanOrEqualTo: , - isLessThan: , - isLessThanOrEqualTo: , - isLike: , - isCaseInsensitiveLike:

Copyright © 1997, Apple Computer, Inc. All rights reserved.