Code example for ContentValues

Methods: containsKeygetAsInteger

0
    public Integer getAsInteger(String key) {
        return getAsInteger(key, null);
    } 
 
    public Integer getAsInteger(String key, Integer defaultValue) {
        if (mAfter != null && mAfter.containsKey(key)) {
            return mAfter.getAsInteger(key);
        } else if (mBefore != null && mBefore.containsKey(key)) {
            return mBefore.getAsInteger(key);
        } else { 
            return defaultValue;
        } 
    } 
 
    public boolean isChanged(String key) {
        if (mAfter == null || !mAfter.containsKey(key)) {
            return false; 
        } 
 
        Object newValue = mAfter.get(key);
        Object oldValue = mBefore.get(key);