Code example for Map

Methods: values

    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) {
            this.tag = tag;
   = id;
        public int hashCode() { 
            int hashCode = 17;
Connect your IDE to all the code out there  Get Codota for Java