public static class ERXArrayUtilities.AvgNonNullOperator extends Object implements NSArray.Operator
NSArray.Operator
for the key avgNonNull.
This allows for key value paths like:
myArray.valueForKey("@avgNonNull.payment.amount");
myArray.valueForKey("payment.@avgNonNull.amount");
myArray.valueForKey("payment.amount.@avgNonNull");
valueForKeyPath
on
the array to its left, but instead loops through the values of the array
to its left, calling
valueForKeyPath
on the individual array values instead. This behavior is consistent with
Apple's standard NSArray operators.Constructor and Description |
---|
AvgNonNullOperator() |
Modifier and Type | Method and Description |
---|---|
Object |
compute(NSArray array,
String keypath)
returns the average value for over all non-null values.
|
public Object compute(NSArray array, String keypath)
compute
in interface NSArray.Operator
array
- array to be checked.keypath
- path to numeric valuesNULL
.Copyright © 2002 – 2020 Project Wonder.