X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fnotify%2FListNotification.java;h=6447990975beec379f04fb1e79e630fe40699268;hb=e9143d456d01cbd20b9c800da217706ad0105ff2;hp=f1343adb006cbb7e09447ed10fbdff7b74586700;hpb=480691a26222e035e53bda56029524e160fdf898;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/notify/ListNotification.java b/src/main/java/net/pterodactylus/sone/notify/ListNotification.java index f1343ad..6447990 100644 --- a/src/main/java/net/pterodactylus/sone/notify/ListNotification.java +++ b/src/main/java/net/pterodactylus/sone/notify/ListNotification.java @@ -1,5 +1,5 @@ /* - * Sone - ListNotification.java - Copyright © 2010–2012 David Roden + * Sone - ListNotification.java - Copyright © 2010–2013 David Roden * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -141,7 +141,9 @@ public class ListNotification extends TemplateNotification { * The element to remove */ public void remove(T element) { - elements.remove(element); + while (elements.remove(element)) { + /* do nothing, just remove all instances of the element. */ + } if (elements.isEmpty()) { dismiss(); } @@ -152,9 +154,6 @@ public class ListNotification extends TemplateNotification { // ABSTRACTNOTIFICATION METHODS // - /** - * {@inheritDoc} - */ @Override public void dismiss() { super.dismiss(); @@ -165,9 +164,6 @@ public class ListNotification extends TemplateNotification { // OBJECT METHODS // - /** - * {@inheritDoc} - */ @Override public int hashCode() { int hashCode = super.hashCode(); @@ -177,9 +173,6 @@ public class ListNotification extends TemplateNotification { return hashCode; } - /** - * {@inheritDoc} - */ @Override public boolean equals(Object object) { if (!(object instanceof ListNotification)) {