Code example for HashMap

Methods: put

0
     * SQLiteQueryBuilder. This is a good way to define aliases for column names, but must include  
     * all columns, even if the value is the key. This allows the ContentProvider to request 
     * columns w/o the need to know real column names and create the alias itself. 
     */ 
    private static HashMap<String,String> buildColumnMap() {
        HashMap<String,String> map = new HashMap<String,String>();
        map.put(KEY_WORD, KEY_WORD);
        map.put(KEY_DEFINITION, KEY_DEFINITION);
        map.put(BaseColumns._ID, "rowid AS " +
                BaseColumns._ID);
        map.put(SearchManager.SUGGEST_COLUMN_INTENT_DATA_ID, "rowid AS " +
                SearchManager.SUGGEST_COLUMN_INTENT_DATA_ID);
        map.put(SearchManager.SUGGEST_COLUMN_SHORTCUT_ID, "rowid AS " +
                SearchManager.SUGGEST_COLUMN_SHORTCUT_ID);
        return map;
    } 
 
    /** 
     * Returns a Cursor positioned at the word specified by rowId 
     * 
     * @param rowId id of word to retrieve