er.extensions.foundation
Class ERXArrayUtilities.LimitOperator
java.lang.Object
er.extensions.foundation.ERXArrayUtilities.LimitOperator
- All Implemented Interfaces:
- NSArray.Operator
- Enclosing class:
- ERXArrayUtilities
public static class ERXArrayUtilities.LimitOperator
- extends Object
Define an NSArray.Operator for the key limit, which
is similar to subarrayWithRange except that it is always from 0 to the limit value. If the limit
specified is larger than the size of the array, the entire array will be returned.
This allows for key value paths like:
myArray.valueForKeyPath("@limit.10.name");
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ERXArrayUtilities.LimitOperator
public ERXArrayUtilities.LimitOperator()
- Constructs a new LimitOperator
compute
public Object compute(NSArray array,
String keypath)
- Computes the subarray of the given array.
- Parameters:
array - array to be checked.keypath - name of fetch specification.
- Returns:
- the subarray for the given limit
contents
public NSArray contents(NSArray array,
String keypath)
Copyright © 2002 – 2007 Project Wonder.