Documentation Archive Developer
Search
PATH  WebObjects 4.0 Documentation > EOControl Reference



EOSortOrderingComparison


(informal protocol)

Category Of: NSObject

Declared in: EOControl/EOSortOrdering.h

Protocol Description

The EOSortOrderingComparison informal protocol defines methods for comparing values. These methods are used for sorting value objects. Though declared for NSObject, most of these methods work properly only with value classes: NSString, NSDate, NSNumber, NSDecimalNumber, and EONull

Sorting value objects
- compareAscending:
- compareCaseInsensitiveAscending:
- compareCaseInsensitiveDescending:
- compareDescending:


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:





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