From: David ‘Bombe’ Roden Date: Tue, 5 Apr 2011 07:57:26 +0000 (+0200) Subject: Add method to set elements to show. X-Git-Tag: 0.6.1^2~41 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=6ef9f03ca1eb071f8915368f00a158a5f9c96d6d Add method to set elements to show. --- diff --git a/src/main/java/net/pterodactylus/sone/notify/ListNotification.java b/src/main/java/net/pterodactylus/sone/notify/ListNotification.java index 2217b70..5f7c1eb 100644 --- a/src/main/java/net/pterodactylus/sone/notify/ListNotification.java +++ b/src/main/java/net/pterodactylus/sone/notify/ListNotification.java @@ -84,6 +84,18 @@ public class ListNotification extends TemplateNotification { } /** + * Sets the elements to show in this notification. + * + * @param elements + * The elements to show + */ + public void setElements(Collection elements) { + this.elements.clear(); + this.elements.addAll(elements); + touch(); + } + + /** * Returns whether there are any new elements. * * @return {@code true} if there are no new elements, {@code false} if there