From 6ef9f03ca1eb071f8915368f00a158a5f9c96d6d Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 5 Apr 2011 09:57:26 +0200 Subject: [PATCH] Add method to set elements to show. --- .../java/net/pterodactylus/sone/notify/ListNotification.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 -- 2.7.4