Rename Lengthed interface to WithLength
authorDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Fri, 10 Jul 2015 05:19:24 +0000 (07:19 +0200)
committerDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Fri, 10 Jul 2015 05:19:24 +0000 (07:19 +0200)
src/main/java/net/pterodactylus/fcp/quelaton/ClientPutCommand.java
src/main/java/net/pterodactylus/fcp/quelaton/ClientPutCommandImpl.java
src/main/java/net/pterodactylus/fcp/quelaton/Lengthed.java [deleted file]
src/main/java/net/pterodactylus/fcp/quelaton/WithLength.java [new file with mode: 0644]

index bb6e099..53eccef 100644 (file)
@@ -16,6 +16,6 @@ public interface ClientPutCommand {
        ClientPutCommand named(String targetFilename);
        WithUri<Optional<Key>> redirectTo(String uri);
        WithUri<Optional<Key>> from(File file);
-       Lengthed<WithUri<Optional<Key>>> from(InputStream inputStream);
+       WithLength<WithUri<Optional<Key>>> from(InputStream inputStream);
 
 }
index d401f8d..44850af 100644 (file)
@@ -66,7 +66,7 @@ class ClientPutCommandImpl implements ClientPutCommand {
        }
 
        @Override
-       public Lengthed<WithUri<Optional<Key>>> from(InputStream inputStream) {
+       public WithLength<WithUri<Optional<Key>>> 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 (file)
index e55b197..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-package net.pterodactylus.fcp.quelaton;
-
-/**
- * An intermediary interface for FCP commands that require a length parameter.
- *
- * @param <R>
- *     The type of the next command part
- * @author <a href="mailto:bombe@freenetproject.org">David ‘Bombe’ Roden</a>
- */
-public interface Lengthed<R> {
-
-       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 (file)
index 0000000..8d38bf3
--- /dev/null
@@ -0,0 +1,14 @@
+package net.pterodactylus.fcp.quelaton;
+
+/**
+ * An intermediary interface for FCP commands that require a length parameter.
+ *
+ * @param <R>
+ *     The type of the next command part
+ * @author <a href="mailto:bombe@freenetproject.org">David ‘Bombe’ Roden</a>
+ */
+public interface WithLength<R> {
+
+       R length(long length);
+
+}