Replace friend-related interfaces with Kotlin versions
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 15 Oct 2017 17:13:50 +0000 (19:13 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 15 Oct 2017 17:13:50 +0000 (19:13 +0200)
src/main/java/net/pterodactylus/sone/database/FriendDatabase.java [deleted file]
src/main/java/net/pterodactylus/sone/database/FriendProvider.java [deleted file]
src/main/java/net/pterodactylus/sone/database/FriendStore.java [deleted file]
src/main/kotlin/net/pterodactylus/sone/database/FriendDatabase.kt [new file with mode: 0644]
src/main/kotlin/net/pterodactylus/sone/database/FriendProvider.kt [new file with mode: 0644]
src/main/kotlin/net/pterodactylus/sone/database/FriendStore.kt [new file with mode: 0644]

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 (file)
index 761d356..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-package net.pterodactylus.sone.database;
-
-/**
- * Combines a {@link FriendProvider} and a {@link FriendStore} into a friend database.
- *
- * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
- */
-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 (file)
index 3665d1b..0000000
+++ /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 <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
- */
-public interface FriendProvider {
-
-       Collection<String> 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 (file)
index 38c1c80..0000000
+++ /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 <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
- */
-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 (file)
index 0000000..75e5623
--- /dev/null
@@ -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 (file)
index 0000000..f56f2f7
--- /dev/null
@@ -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<String>
+       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 (file)
index 0000000..5e7a222
--- /dev/null
@@ -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)
+
+}