Expose the elements of the list notification.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 21 Nov 2010 17:22:20 +0000 (18:22 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 21 Nov 2010 17:22:20 +0000 (18:22 +0100)
src/main/java/net/pterodactylus/sone/notify/ListNotification.java

index 423bea4..7a0d6f8 100644 (file)
@@ -56,6 +56,15 @@ public class ListNotification<T> extends TemplateNotification {
        //
 
        /**
+        * Returns the current list of elements.
+        *
+        * @return The current list of elements
+        */
+       public List<T> getElements() {
+               return new ArrayList<T>(elements);
+       }
+
+       /**
         * Returns whether there are any new elements.
         *
         * @return {@code true} if there are no new elements, {@code false} if there