Object currentValue = NSKeyValueCodingAdditions.DefaultImplementation.valueForKeyPath(currentObject, keyPath);
Object currentValue = NSKeyValueCodingAdditions.Utility.valueForKeyPath(currentObject, keyPath);
    public static int indexOfFirstObjectWithValueForKeyPath(NSArray array, Object value, String keyPath) {        final int count = array.count();        int result = -1;        int i = 0;        while ( i < count) {            Object currentObject = array.objectAtIndex(i);            if(currentObject != NSKeyValueCoding.NullValue) {                Object currentValue = NSKeyValueCodingAdditions.DefaultImplementation.valueForKeyPath(currentObject, keyPath);                currentValue = (currentValue == NSKeyValueCoding.NullValue ? null : currentValue);                if(currentValue == value || (value != null && value.equals(currentValue))) {                    return i;                }            }            i++;        }                return result;    }