Replace Fetched with Kotlin version
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 3 Mar 2018 08:13:28 +0000 (09:13 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 3 Mar 2018 08:13:43 +0000 (09:13 +0100)
src/main/java/net/pterodactylus/sone/core/Fetched.java [deleted file]
src/main/kotlin/net/pterodactylus/sone/core/Fetched.kt [new file with mode: 0644]

diff --git a/src/main/java/net/pterodactylus/sone/core/Fetched.java b/src/main/java/net/pterodactylus/sone/core/Fetched.java
deleted file mode 100644 (file)
index d8c12f5..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-package net.pterodactylus.sone.core;
-
-import freenet.client.FetchResult;
-import freenet.keys.FreenetURI;
-
-/**
- * Container for a fetched URI and the {@link FetchResult}.
- *
- * @author <a href="mailto:d.roden@xplosion.de">David Roden</a>
- */
-public class Fetched {
-
-       /** The fetched URI. */
-       private final FreenetURI freenetUri;
-
-       /** The fetch result. */
-       private final FetchResult fetchResult;
-
-       /**
-        * Creates a new fetched URI.
-        *
-        * @param freenetUri
-        *            The URI that was fetched
-        * @param fetchResult
-        *            The fetch result
-        */
-       public Fetched(FreenetURI freenetUri, FetchResult fetchResult) {
-               this.freenetUri = freenetUri;
-               this.fetchResult = fetchResult;
-       }
-
-       //
-       // ACCESSORS
-       //
-
-       /**
-        * Returns the fetched URI.
-        *
-        * @return The fetched URI
-        */
-       public FreenetURI getFreenetUri() {
-               return freenetUri;
-       }
-
-       /**
-        * Returns the fetch result.
-        *
-        * @return The fetch result
-        */
-       public FetchResult getFetchResult() {
-               return fetchResult;
-       }
-
-}
diff --git a/src/main/kotlin/net/pterodactylus/sone/core/Fetched.kt b/src/main/kotlin/net/pterodactylus/sone/core/Fetched.kt
new file mode 100644 (file)
index 0000000..1f48e3e
--- /dev/null
@@ -0,0 +1,9 @@
+package net.pterodactylus.sone.core
+
+import freenet.client.FetchResult
+import freenet.keys.FreenetURI
+
+/**
+ * Container for a fetched URI and the [FetchResult].
+ */
+data class Fetched(val freenetUri: FreenetURI, val fetchResult: FetchResult)