X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fnotify%2FListNotification.java;h=6447990975beec379f04fb1e79e630fe40699268;hb=0a4b6fc252003c71f4bdef09560e87982838d9c8;hp=cf658bd268df005caa395029642a0f3608d4ec51;hpb=89e431b7cda6e2091bad97c9bfa2aa1b3f4409f0;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 cf658bd..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 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)) {