Inherits From:
java.lang.Object
Package:
com.apple.client.eocontrol (Siva)
Siva's class EOSortOrdering.ComparisonSupport provides default implementations of the EOSortOrderingComparison interface. It is for use in client-side enterprise object classes only; there is no equivalent Yellow Box class for server-side enterprise objects.
Siva's EOCustomObject uses EOSortOrdering.ComparisonSupport's default implementations. Typically your custom enterprise object classes inherit from EOCustomObject and inherit the default implementations. If your custom enterprise object class doesn't inherit from EOCustomObject, you should implement the EOSortOrderingComparison interface directly.
compareValues
public static int compareValues (java.lang.Object anObject, java.lang.Object anotherObject, com.apple.client.foundation.NSSelector selector)
Compares the two objects using selector. You should use this method to compare value objects instead of calling selector directly. This method is the entry point for the comparison support, and calls methods in support classes if appropriate.
See also: setSupportForClass , supportForClass
setSupportForClass
public static void setSupportForClass (EOSortOrdering. ComparisonSupport supportClass, java.lang.Class aClass)
Sets supportClass as the support class to be used for comparing instances of aClass. When compareValues is called, the methods in supportClass will be used to do the comparison for instances of aClass.
See also: compareValues
supportForClass
public static EOSortOrdering. ComparisonSupport supportForClass (java.lang.Class aClass)
Returns the support class used for doing sort ordering comparisons for instances of aClass.
See also: compareValues , setSupportForClass
compareAscending
public int compareAscending (java.lang.Object receiver, java.lang.Object anObject)
Returns NSOrderedAscending if anObject is naturally ordered after receiver, NSOrderedDescending if it's naturally ordered before 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
public int compareCaseInsensitiveAscending (java.lang.Object receiver, java.lang.Object anObject)
Returns NSOrderedAscending if anObject is naturally ordered-ignoring case-after receiver, NSOrderedDescending if it's naturally ordered before 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
public int compareCaseInsensitiveDescending (java.lang.Object receiver, java.lang.Object anObject)
Returns NSOrderedAscending if anObject is naturally ordered-ignoring case-before receiver, NSOrderedDescending if it's naturally ordered after 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: compareCaseInsensitiveDescending , compareDescending , compareAscending
compareDescending
public int compareDescending (java.lang.Object anObject, java.lang.Object anObject)
Returns NSOrderedAscending if anObject is naturally ordered before receiver, NSOrderedDescending if it's naturally ordered after 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