X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fnotify%2FNewSoneNotification.java;h=0615a790c99d2c16045bfaf266919aa8607311ef;hb=aea803839fdc9ddfff2c90aad0dbbbdad1ca5097;hp=1d96be5899ceb27570e6beb3a44237b78998639a;hpb=5257453a433d221f92b4b9a5f41ebc38cd6baaa4;p=Sone.git 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();