From bf01c9824a883d0446ce33e68e398abbdd7bf22d Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 29 Jan 2013 06:45:28 +0100 Subject: [PATCH] Move more methods to the Sone provider interface. --- src/main/java/net/pterodactylus/sone/core/Core.java | 10 ++++------ .../java/net/pterodactylus/sone/database/SoneProvider.java | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index de6ba55..9fe41ac 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -373,10 +373,9 @@ public class Core extends AbstractService implements SoneProvider, PostProvider, } /** - * Returns all local Sones. - * - * @return All local Sones + * {@inheritDocs} */ + @Override public Collection getLocalSones() { synchronized (sones) { return Collections2.filter(sones.values(), new Predicate() { @@ -415,10 +414,9 @@ public class Core extends AbstractService implements SoneProvider, PostProvider, } /** - * Returns all remote Sones. - * - * @return All remote Sones + * {@inheritDocs} */ + @Override public Collection getRemoteSones() { synchronized (sones) { return Collections2.filter(sones.values(), new Predicate() { diff --git a/src/main/java/net/pterodactylus/sone/database/SoneProvider.java b/src/main/java/net/pterodactylus/sone/database/SoneProvider.java index f484aaf..993804f 100644 --- a/src/main/java/net/pterodactylus/sone/database/SoneProvider.java +++ b/src/main/java/net/pterodactylus/sone/database/SoneProvider.java @@ -47,4 +47,18 @@ public interface SoneProvider { */ public Collection getSones(); + /** + * Returns all local Sones. + * + * @return All local Sones + */ + public Collection getLocalSones(); + + /** + * Returns all remote Sones. + * + * @return All remote Sones + */ + public Collection getRemoteSones(); + } -- 2.7.4