From 9974554893d242667d5a7aace777ce07f7c07f95 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 8 Apr 2011 15:59:10 +0200 Subject: [PATCH] Add method to copy a SimpleFieldSet into this builder. --- .../pterodactylus/sone/freenet/SimpleFieldSetBuilder.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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. * -- 2.7.4