Code example for ConcurrentHashMap

Methods: isEmpty

0
 
        @Override 
        public void taskComplete() { 
            //Log.d(TAG, "Task complete: " + mStartId); 
            // If we have notifications, then we can't stop ourselves. 
            if (mNotifications.isEmpty()) {
                stopSelfResult(mStartId);
            } 
        } 
 
        @Override 
        public void setNotification(int id, Notification notification) {
            mNotifications.put(id, notification);
            mNM.notify(id, notification);
        } 
 
        @Override 
        public void cancelNotification(int id) {
            mNM.cancel(id);
            mNotifications.remove(id);
            // If there are no more notifications