er.extensions.foundation
Class ERXArrayUtilities.SortOperator
java.lang.Object
er.extensions.foundation.ERXArrayUtilities.SortOperator
- All Implemented Interfaces:
- NSArray.Operator
- Enclosing class:
- ERXArrayUtilities
public static class ERXArrayUtilities.SortOperator
- extends Object
- implements NSArray.Operator
Define an NSArray.Operator for the key sort.
This allows for key value paths like:
myArray.valueForKey("@sort.firstName");
myArray.valueForKey("@sort.lastName,firstName");
Which in the first case would return myArray sorted ascending by first name and the second case
by lastName and then by firstName.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ERXArrayUtilities.SortOperator
public ERXArrayUtilities.SortOperator(NSSelector selector)
- public empty constructor
compute
public Object compute(NSArray array,
String keypath)
- Sorts the given array by the keypath.
- Specified by:
compute in interface NSArray.Operator
- Parameters:
array - array to be sorted.keypath - sort key.
- Returns:
- immutable sorted array.
Copyright © 2002 – 2007 Project Wonder.