Code example for HashMap

Methods: size, values

0
                return mContext.getString(R.string.num_unread_chats, count);
            } 
        } 
 
        public Intent getIntent() {
            int count = mItems.size();
            if (count == 0) {
                return getDefaultIntent(); 
            } else if (count == 1) {
                Item item = mItems.values().iterator().next();
                return item.mIntent;
            } else { 
                return getMultipleNotificationIntent(); 
            } 
        } 
    } 
 
    private static void log(String msg) {
        RemoteImService.debug("[StatusBarNotify] " + msg);
    }