From: David ‘Bombe’ Roden Date: Sun, 14 Nov 2010 19:28:25 +0000 (+0100) Subject: Enhance javadoc, remove obsolete isEmpty() method. X-Git-Tag: 0.3-RC1~69 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=aea803839fdc9ddfff2c90aad0dbbbdad1ca5097;p=Sone.git Enhance javadoc, remove obsolete isEmpty() method. --- 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();