From: David ‘Bombe’ Roden Date: Fri, 8 Apr 2011 13:59:10 +0000 (+0200) Subject: Add method to copy a SimpleFieldSet into this builder. X-Git-Tag: 0.6.5^2~39^2~36 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=9974554893d242667d5a7aace777ce07f7c07f95;p=Sone.git Add method to copy a SimpleFieldSet into this builder. --- diff --git a/src/main/java/net/pterodactylus/sone/freenet/SimpleFieldSetBuilder.java b/src/main/java/net/pterodactylus/sone/freenet/SimpleFieldSetBuilder.java index f440e50..1d57454 100644 --- a/src/main/java/net/pterodactylus/sone/freenet/SimpleFieldSetBuilder.java +++ b/src/main/java/net/pterodactylus/sone/freenet/SimpleFieldSetBuilder.java @@ -60,6 +60,19 @@ public class SimpleFieldSetBuilder { } /** + * Copies the given simple field set into the simple field set being built + * in this builder, overwriting all previously existing values. + * + * @param simpleFieldSet + * The simple field set to copy + * @return This simple field set builder + */ + public SimpleFieldSetBuilder put(SimpleFieldSet simpleFieldSet) { + this.simpleFieldSet.putAllOverwrite(simpleFieldSet); + return this; + } + + /** * Stores the given value under the given key, overwriting any previous * value. *