public static class ERXArrayUtilities.StandardDeviationOperator extends Object implements NSArray.Operator
NSArray.Operator
for the key stdDev and popStdDev.
This allows for key value paths like:
myArray.valueForKey("@stdDev.payment.amount");
myArray.valueForKey("payment.@stdDev.amount");
myArray.valueForKey("payment.amount.@stdDev");
The standard deviation operator applies to the array of objects to its
left if it is the last key in the path. Otherwise it applies to the end
of the keypath to its right. It should not be followed by an array or
any other array operators. This is because it does not call
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 |
---|
StandardDeviationOperator(boolean isPopulation) |
Modifier and Type | Method and Description |
---|---|
Object |
compute(NSArray array,
String keypath)
returns the standard deviation value for the values of the keypath.
|
public Object compute(NSArray array, String keypath)
compute
in interface NSArray.Operator
array
- array to be checked.keypath
- path to numeric valuesCopyright © 2002 – 2024 Project Wonder.