Code example for Map

Methods: size

0
    public void cancelAll() { 
        notifications.clear();
    } 
 
    public int size() { 
        return notifications.size();
    } 
 
    public Notification getNotification(String tag, int id) {
        return notifications.get(new Key(tag, id));
    } 
 
    public List<Notification> getAllNotifications() {
        return new ArrayList<Notification>(notifications.values());
    } 
     
    private static final class Key { 
        public final String tag;
        public final int id;
 
        private Key(String tag, int id) {