X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fnotify%2FNewSoneNotification.java;h=f3388b10ef7887eb725d8b13a75bd514b89935b0;hb=bb075f1e55e6c0526594c8a9cd33c2afcf75cce6;hp=0615a790c99d2c16045bfaf266919aa8607311ef;hpb=31498619c5f1a97b507ae21ee822cea17481561c;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 0615a79..f3388b1 100644 --- a/src/main/java/net/pterodactylus/sone/notify/NewSoneNotification.java +++ b/src/main/java/net/pterodactylus/sone/notify/NewSoneNotification.java @@ -51,6 +51,16 @@ public class NewSoneNotification extends TemplateNotification { // /** + * Returns whether there are any new Sones. + * + * @return {@code true} if there are no new Sones, {@code false} if there + * are new Sones + */ + public boolean isEmpty() { + return newSones.isEmpty(); + } + + /** * Adds a discovered Sone. * * @param sone @@ -61,6 +71,17 @@ public class NewSoneNotification extends TemplateNotification { touch(); } + /** + * Removes the given Sone from the list of new Sones. + * + * @param sone + * The Sone to remove + */ + public void removeSone(Sone sone) { + newSones.remove(sone); + touch(); + } + // // ABSTRACTNOTIFICATION METHODS //