Expose method to set field on message
authorDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Tue, 24 Nov 2015 19:29:20 +0000 (20:29 +0100)
committerDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Tue, 24 Nov 2015 19:29:20 +0000 (20:29 +0100)
src/main/java/net/pterodactylus/fcp/FcpMessage.java

index ed4ae46..d9fff9b 100644 (file)
@@ -110,6 +110,11 @@ public class FcpMessage implements Iterable<String> {
                fields.put(field, value);
        }
 
+       public FcpMessage put(String field, String value) {
+               setField(field, value);
+               return this;
+       }
+
        /**
         * Returns the value of the given field.
         *