projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Refactoring.
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
notify
/
ListNotification.java
diff --git
a/src/main/java/net/pterodactylus/sone/notify/ListNotification.java
b/src/main/java/net/pterodactylus/sone/notify/ListNotification.java
index
d99424c
..
6447990
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/notify/ListNotification.java
+++ b/
src/main/java/net/pterodactylus/sone/notify/ListNotification.java
@@
-141,7
+141,9
@@
public class ListNotification<T> extends TemplateNotification {
* The element to remove
*/
public void remove(T element) {
* 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();
}
if (elements.isEmpty()) {
dismiss();
}
@@
-152,9
+154,6
@@
public class ListNotification<T> extends TemplateNotification {
// ABSTRACTNOTIFICATION METHODS
//
// ABSTRACTNOTIFICATION METHODS
//
- /**
- * {@inheritDoc}
- */
@Override
public void dismiss() {
super.dismiss();
@Override
public void dismiss() {
super.dismiss();
@@
-165,9
+164,6
@@
public class ListNotification<T> extends TemplateNotification {
// OBJECT METHODS
//
// OBJECT METHODS
//
- /**
- * {@inheritDoc}
- */
@Override
public int hashCode() {
int hashCode = super.hashCode();
@Override
public int hashCode() {
int hashCode = super.hashCode();
@@
-177,9
+173,6
@@
public class ListNotification<T> extends TemplateNotification {
return hashCode;
}
return hashCode;
}
- /**
- * {@inheritDoc}
- */
@Override
public boolean equals(Object object) {
if (!(object instanceof ListNotification)) {
@Override
public boolean equals(Object object) {
if (!(object instanceof ListNotification)) {