Add method to check for the remoteness of a Sone by its ID.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 8 Nov 2010 19:42:01 +0000 (20:42 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 10 Nov 2010 19:50:11 +0000 (20:50 +0100)
src/main/java/net/pterodactylus/sone/core/Core.java

index 5475dc6..af1523a 100644 (file)
@@ -306,6 +306,20 @@ public class Core implements IdentityListener {
        }
 
        /**
+        * Returns whether the Sone with the given ID is a remote Sone.
+        *
+        * @param id
+        *            The ID of the Sone to check
+        * @return {@code true} if the Sone with the given ID is a remote Sone,
+        *         {@code false} otherwise
+        */
+       public boolean isRemoteSone(String id) {
+               synchronized (remoteSones) {
+                       return remoteSones.containsKey(id);
+               }
+       }
+
+       /**
         * Returns the post with the given ID.
         *
         * @param postId