Code example for ConcurrentHashMap

Methods: put

0
     * @param id             the unique ID of the notification 
     * @param aNotification  the Notification to add 
     */ 
    public void add(int id, Notification notification) {
        mNotificationManager.notify(id, notification);
        mNotifications.put(id, notification);
 
        if (mForegroundNotification == null && isOngoing(notification)) {
            setForegroundNotification(id, notification);
        } 
    } 
 
    /** 
     * Updates a notification. 
     * 
     * @param notificationID ID of existing notification 
     * @param aProgress      progress of item being updated 
     * @param aProgressMax   max progress of item being updated 
     * @param aAlertText     text of the notification 
     */ 
    public void update(int notificationID, long aProgress, long aProgressMax, String aAlertText) {