Android examples for android.content:ContentValues
wrap ContentValues
//package com.java2s; import android.content.ContentValues; public class Main { public static ContentValues wrapContentValues(String[] columns, String[] values) {//from w w w . ja v a 2s .c o m if (columns == null || values == null || (columns.length != values.length)) { throw new IllegalArgumentException( "Cannot wrap content values due to wrong parameters!"); } ContentValues cv = new ContentValues(); for (int i = 0; i < values.length; i++) { cv.put(columns[i], values[i]); } return cv; } }