|
WebObjects 5.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.webobjects.eocontrol.EOSortOrdering.ComparisonSupport
ComparisonSupport provides default implementations of the EOSortOrdering.Comparison interface and a registry for support objects.
Constructor Summary | |
EOSortOrdering.ComparisonSupport()
|
Method Summary | |
int |
compareAscending(Object left,
Object right)
Returns the ordering of left relative to right . |
int |
compareCaseInsensitiveAscending(Object left,
Object right)
Returns the ordering of left relative to right , ignoring case. |
int |
compareCaseInsensitiveDescending(Object left,
Object right)
Returns the ordering of left relative to right , ignoring case. |
int |
compareDescending(Object left,
Object right)
Returns the ordering of left relative to right . |
static int |
compareValues(Object left,
Object right,
NSSelector selector)
Compares the two objects using selector . |
static void |
setSupportForClass(EOSortOrdering.ComparisonSupport support,
Class aClass)
Sets support as the support object to be used for comparing
instances of aClass . |
static EOSortOrdering.ComparisonSupport |
supportForClass(Class aClass)
Returns the support object used for doing sort ordering comparisons for instances of aClass . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public EOSortOrdering.ComparisonSupport()
Method Detail |
public int compareAscending(Object left, Object right)
left
relative to right
.left
- the left hand side objectright
- the right hand side objectNSComparator.OrderedAscending
if right
is
naturally ordered after left
, NSComparator.OrderedDescending
if it's naturally ordered before left
, and NSComparator.OrderedSame
if they're equivalent for ordering purposespublic int compareCaseInsensitiveAscending(Object left, Object right)
left
relative to right
, ignoring case.left
- the left hand side objectright
- the right hand side objectNSComparator.OrderedAscending
if right
is
naturally ordered ignoring case after left
,
NSComparator.OrderedDescending
if it's naturally ordered before
left
, and NSComparator.OrderedSame
if they're equivalent
for ordering purposespublic int compareCaseInsensitiveDescending(Object left, Object right)
left
relative to right
, ignoring case.left
- the left hand side objectright
- the right hand side objectNSComparator.OrderedAscending
if right
is
naturally ordered ignoring case before left
,
NSComparator.OrderedDescending
if it's naturally ordered after
left
, and NSComparator.OrderedSame
if they're
equivalent for ordering purposespublic int compareDescending(Object left, Object right)
left
relative to right
.left
- the left hand side objectright
- the right hand side objectNSComparator.OrderedAscending
if right
is
naturally ordered before left
, NSComparator.OrderedDescending
if it's naturally ordered after left
, and NSComparator.OrderedSame
if they're equivalent for ordering purposespublic static int compareValues(Object left, Object right, NSSelector selector)
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 objects if appropriate.left
- the object to compare as the left hand side of the inequalityright
- the object to compare as the right hand side of the inequalityselector
- method selector to use to compare the left
and right
objectsNSComparator.OrderedAscending
if right
is
naturally ordered after left
, NSComparator.OrderedDescending
if it's naturally ordered before left
, and NSComparator.OrderedSame
if they're equivalent for ordering purposespublic static void setSupportForClass(EOSortOrdering.ComparisonSupport support, Class aClass)
support
as the support object to be used for comparing
instances of aClass
. When compareValues
is called, the methods in
support
are used to do the comparison for instances of aClass
.support
- the comparison support object to be used when comparing instances of aClass
aClass
- the Class of objects that will be compared using support
public static EOSortOrdering.ComparisonSupport supportForClass(Class aClass)
aClass
.aClass
- the Class to create a comparison support object foraClass
|
Last updated Fri Feb 21 13:15:00 PST 2003. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |