Add method to set elements to show.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 5 Apr 2011 07:57:26 +0000 (09:57 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 5 Apr 2011 08:06:14 +0000 (10:06 +0200)
src/main/java/net/pterodactylus/sone/notify/ListNotification.java

index 2217b70..5f7c1eb 100644 (file)
@@ -84,6 +84,18 @@ public class ListNotification<T> extends TemplateNotification {
        }
 
        /**
        }
 
        /**
+        * Sets the elements to show in this notification.
+        *
+        * @param elements
+        *            The elements to show
+        */
+       public void setElements(Collection<? extends T> 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
         * Returns whether there are any new elements.
         *
         * @return {@code true} if there are no new elements, {@code false} if there