From: David ‘Bombe’ Roden Date: Wed, 10 Nov 2010 19:29:25 +0000 (+0100) Subject: Add method to check whether the core knows about a Sone. X-Git-Tag: 0.2.1~12 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=7ec5cf4d41166dab589d026256ee995068577ef2;p=Sone.git Add method to check whether the core knows about a Sone. --- diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index b16165e..ad19824 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -231,6 +231,18 @@ public class Core implements IdentityListener { } /** + * Checks whether the core knows a Sone with the given ID. + * + * @param id + * The ID of the Sone + * @return {@code true} if there is a Sone with the given ID, {@code false} + * otherwise + */ + public boolean hasSone(String id) { + return isLocalSone(id) || isRemoteSone(id); + } + + /** * Returns whether the given Sone is a local Sone. * * @param sone