From: David ‘Bombe’ Roden Date: Fri, 10 Jul 2015 05:19:24 +0000 (+0200) Subject: Rename Lengthed interface to WithLength X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=65b7fe5c454d82b49211526e5688f596e8e70d5a;p=jFCPlib.git Rename Lengthed interface to WithLength --- diff --git a/src/main/java/net/pterodactylus/fcp/quelaton/ClientPutCommand.java b/src/main/java/net/pterodactylus/fcp/quelaton/ClientPutCommand.java index bb6e099..53eccef 100644 --- a/src/main/java/net/pterodactylus/fcp/quelaton/ClientPutCommand.java +++ b/src/main/java/net/pterodactylus/fcp/quelaton/ClientPutCommand.java @@ -16,6 +16,6 @@ public interface ClientPutCommand { ClientPutCommand named(String targetFilename); WithUri> redirectTo(String uri); WithUri> from(File file); - Lengthed>> from(InputStream inputStream); + WithLength>> from(InputStream inputStream); } diff --git a/src/main/java/net/pterodactylus/fcp/quelaton/ClientPutCommandImpl.java b/src/main/java/net/pterodactylus/fcp/quelaton/ClientPutCommandImpl.java index d401f8d..44850af 100644 --- a/src/main/java/net/pterodactylus/fcp/quelaton/ClientPutCommandImpl.java +++ b/src/main/java/net/pterodactylus/fcp/quelaton/ClientPutCommandImpl.java @@ -66,7 +66,7 @@ class ClientPutCommandImpl implements ClientPutCommand { } @Override - public Lengthed>> from(InputStream inputStream) { + public WithLength>> from(InputStream inputStream) { payload.set(Objects.requireNonNull(inputStream, "inputStream must not be null")); return this::length; } diff --git a/src/main/java/net/pterodactylus/fcp/quelaton/Lengthed.java b/src/main/java/net/pterodactylus/fcp/quelaton/Lengthed.java deleted file mode 100644 index e55b197..0000000 --- a/src/main/java/net/pterodactylus/fcp/quelaton/Lengthed.java +++ /dev/null @@ -1,14 +0,0 @@ -package net.pterodactylus.fcp.quelaton; - -/** - * An intermediary interface for FCP commands that require a length parameter. - * - * @param - * The type of the next command part - * @author David ‘Bombe’ Roden - */ -public interface Lengthed { - - R length(long length); - -} diff --git a/src/main/java/net/pterodactylus/fcp/quelaton/WithLength.java b/src/main/java/net/pterodactylus/fcp/quelaton/WithLength.java new file mode 100644 index 0000000..8d38bf3 --- /dev/null +++ b/src/main/java/net/pterodactylus/fcp/quelaton/WithLength.java @@ -0,0 +1,14 @@ +package net.pterodactylus.fcp.quelaton; + +/** + * An intermediary interface for FCP commands that require a length parameter. + * + * @param + * The type of the next command part + * @author David ‘Bombe’ Roden + */ +public interface WithLength { + + R length(long length); + +}