er.extensions.foundation
Class ERXArrayUtilities.SubarrayWithRangeOperator
java.lang.Object
er.extensions.foundation.ERXArrayUtilities.SubarrayWithRangeOperator
- All Implemented Interfaces:
- NSArray.Operator
- Enclosing class:
- ERXArrayUtilities
public static class ERXArrayUtilities.SubarrayWithRangeOperator
- extends Object
Define an NSArray.Operator for the key subarrayWithRange.
This allows for key value paths like:
myArray.valueForKeyPath("@subarrayWithRange.20-3.name");
Note that the syntax is slightly misleading, implying that you provide a start and end index. In fact, the
API matches NSRange and you must provide a start index and a length. Unfortunately changing this either
syntax or implementation will break backwards compatibility (and subtly), so we have to suck it up for now.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ERXArrayUtilities.SubarrayWithRangeOperator
public ERXArrayUtilities.SubarrayWithRangeOperator()
- public empty constructor
compute
public Object compute(NSArray array,
String keypath)
- Parameters:
array - array to be checked.keypath - name of fetch specification.
- Returns:
Boolean.TRUE if array is empty, Boolean.FALSE otherwise.
contents
public NSArray contents(NSArray array,
String keypath)
Copyright © 2002 – 2007 Project Wonder.