Code example for ContentValues

Methods: getAsInteger

        final int index = Integer.parseInt(uri.getPathSegments().get(0));
        final MatrixCursor c = new MatrixCursor(
                new String[]{ Columns.ID, Columns.CITY, Columns.TEMPERATURE });
        assert(0 <= index && index < sData.size());
        final WeatherDataPoint data = sData.get(index);
        data.degrees = values.getAsInteger(Columns.TEMPERATURE);
        // Notify any listeners that the data backing the content provider has changed, and return 
        // the number of rows affected. 
        getContext().getContentResolver().notifyChange(uri, null);
        return 1; 
Connect your IDE to all the code out there  Get Codota for Java