From aea803839fdc9ddfff2c90aad0dbbbdad1ca5097 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sun, 14 Nov 2010 20:28:25 +0100 Subject: [PATCH] Enhance javadoc, remove obsolete isEmpty() method. --- .../sone/notify/NewSoneNotification.java | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/notify/NewSoneNotification.java b/src/main/java/net/pterodactylus/sone/notify/NewSoneNotification.java index 1d96be5..0615a79 100644 --- a/src/main/java/net/pterodactylus/sone/notify/NewSoneNotification.java +++ b/src/main/java/net/pterodactylus/sone/notify/NewSoneNotification.java @@ -26,29 +26,36 @@ import net.pterodactylus.util.notify.TemplateNotification; import net.pterodactylus.util.template.Template; /** - * TODO + * Notification that signals that new Sones have been discovered. * * @author David ‘Bombe’ Roden */ public class NewSoneNotification extends TemplateNotification { + /** The new Sones. */ private List newSones = Collections.synchronizedList(new ArrayList()); /** - * TODO + * Creates a new “new Sone discovered” notification. + * + * @param template + * The template to render */ public NewSoneNotification(Template template) { super(template); + template.set("sones", newSones); } // // ACCESSORS // - public boolean isEmpty() { - return newSones.isEmpty(); - } - + /** + * Adds a discovered Sone. + * + * @param sone + * The new Sone + */ public void addSone(Sone sone) { newSones.add(sone); touch(); -- 2.7.4