From: David ‘Bombe’ Roden Date: Sat, 3 Mar 2018 08:13:28 +0000 (+0100) Subject: Replace Fetched with Kotlin version X-Git-Tag: v79^2~131 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=e7550501ed1b8bcb07206a0fb76f07a52c300c6d;p=Sone.git Replace Fetched with Kotlin version --- 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 index d8c12f5..0000000 --- a/src/main/java/net/pterodactylus/sone/core/Fetched.java +++ /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 David Roden - */ -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 index 0000000..1f48e3e --- /dev/null +++ b/src/main/kotlin/net/pterodactylus/sone/core/Fetched.kt @@ -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)