From f04d2fa7340922ba1d99e0626c355ac992a1eff1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sun, 15 Oct 2017 19:13:50 +0200 Subject: [PATCH] Replace friend-related interfaces with Kotlin versions --- .../net/pterodactylus/sone/database/FriendDatabase.java | 10 ---------- .../net/pterodactylus/sone/database/FriendProvider.java | 17 ----------------- .../net/pterodactylus/sone/database/FriendStore.java | 15 --------------- .../net/pterodactylus/sone/database/FriendDatabase.kt | 6 ++++++ .../net/pterodactylus/sone/database/FriendProvider.kt | 13 +++++++++++++ .../net/pterodactylus/sone/database/FriendStore.kt | 13 +++++++++++++ 6 files changed, 32 insertions(+), 42 deletions(-) delete mode 100644 src/main/java/net/pterodactylus/sone/database/FriendDatabase.java delete mode 100644 src/main/java/net/pterodactylus/sone/database/FriendProvider.java delete mode 100644 src/main/java/net/pterodactylus/sone/database/FriendStore.java create mode 100644 src/main/kotlin/net/pterodactylus/sone/database/FriendDatabase.kt create mode 100644 src/main/kotlin/net/pterodactylus/sone/database/FriendProvider.kt create mode 100644 src/main/kotlin/net/pterodactylus/sone/database/FriendStore.kt diff --git a/src/main/java/net/pterodactylus/sone/database/FriendDatabase.java b/src/main/java/net/pterodactylus/sone/database/FriendDatabase.java deleted file mode 100644 index 761d356..0000000 --- a/src/main/java/net/pterodactylus/sone/database/FriendDatabase.java +++ /dev/null @@ -1,10 +0,0 @@ -package net.pterodactylus.sone.database; - -/** - * Combines a {@link FriendProvider} and a {@link FriendStore} into a friend database. - * - * @author David ‘Bombe’ Roden - */ -public interface FriendDatabase extends FriendProvider, FriendStore { - -} diff --git a/src/main/java/net/pterodactylus/sone/database/FriendProvider.java b/src/main/java/net/pterodactylus/sone/database/FriendProvider.java deleted file mode 100644 index 3665d1b..0000000 --- a/src/main/java/net/pterodactylus/sone/database/FriendProvider.java +++ /dev/null @@ -1,17 +0,0 @@ -package net.pterodactylus.sone.database; - -import java.util.Collection; - -import net.pterodactylus.sone.data.Sone; - -/** - * Provides information about {@link Sone#getFriends() friends} of a {@link Sone}. - * - * @author David ‘Bombe’ Roden - */ -public interface FriendProvider { - - Collection getFriends(Sone localSone); - boolean isFriend(Sone localSone, String friendSoneId); - -} diff --git a/src/main/java/net/pterodactylus/sone/database/FriendStore.java b/src/main/java/net/pterodactylus/sone/database/FriendStore.java deleted file mode 100644 index 38c1c80..0000000 --- a/src/main/java/net/pterodactylus/sone/database/FriendStore.java +++ /dev/null @@ -1,15 +0,0 @@ -package net.pterodactylus.sone.database; - -import net.pterodactylus.sone.data.Sone; - -/** - * Stores information about the {@link Sone#getFriends() friends} of a {@link Sone}. - * - * @author David ‘Bombe’ Roden - */ -public interface FriendStore { - - void addFriend(Sone localSone, String friendSoneId); - void removeFriend(Sone localSone, String friendSoneId); - -} diff --git a/src/main/kotlin/net/pterodactylus/sone/database/FriendDatabase.kt b/src/main/kotlin/net/pterodactylus/sone/database/FriendDatabase.kt new file mode 100644 index 0000000..75e5623 --- /dev/null +++ b/src/main/kotlin/net/pterodactylus/sone/database/FriendDatabase.kt @@ -0,0 +1,6 @@ +package net.pterodactylus.sone.database + +/** + * Combines a [FriendProvider] and a [FriendStore] into a friend database. + */ +interface FriendDatabase : FriendProvider, FriendStore diff --git a/src/main/kotlin/net/pterodactylus/sone/database/FriendProvider.kt b/src/main/kotlin/net/pterodactylus/sone/database/FriendProvider.kt new file mode 100644 index 0000000..f56f2f7 --- /dev/null +++ b/src/main/kotlin/net/pterodactylus/sone/database/FriendProvider.kt @@ -0,0 +1,13 @@ +package net.pterodactylus.sone.database + +import net.pterodactylus.sone.data.Sone + +/** + * Provides information about [friends][Sone.getFriends] of a [Sone]. + */ +interface FriendProvider { + + fun getFriends(localSone: Sone): Collection + fun isFriend(localSone: Sone, friendSoneId: String): Boolean + +} diff --git a/src/main/kotlin/net/pterodactylus/sone/database/FriendStore.kt b/src/main/kotlin/net/pterodactylus/sone/database/FriendStore.kt new file mode 100644 index 0000000..5e7a222 --- /dev/null +++ b/src/main/kotlin/net/pterodactylus/sone/database/FriendStore.kt @@ -0,0 +1,13 @@ +package net.pterodactylus.sone.database + +import net.pterodactylus.sone.data.Sone + +/** + * Stores information about the [friends][Sone.getFriends] of a [Sone]. + */ +interface FriendStore { + + fun addFriend(localSone: Sone, friendSoneId: String) + fun removeFriend(localSone: Sone, friendSoneId: String) + +} -- 2.7.4