From: David ‘Bombe’ Roden Date: Sat, 27 Jun 2015 21:43:05 +0000 (+0200) Subject: Add fluent method to set a field X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=a11e8dfb9da8691cbf5a8d330497a277e3aea94f;p=jFCPlib.git Add fluent method to set a field --- diff --git a/src/main/java/net/pterodactylus/fcp/FcpMessage.java b/src/main/java/net/pterodactylus/fcp/FcpMessage.java index ed4ae46..d9fff9b 100644 --- a/src/main/java/net/pterodactylus/fcp/FcpMessage.java +++ b/src/main/java/net/pterodactylus/fcp/FcpMessage.java @@ -110,6 +110,11 @@ public class FcpMessage implements Iterable { fields.put(field, value); } + public FcpMessage put(String field, String value) { + setField(field, value); + return this; + } + /** * Returns the value of the given field. *