Add method to copy a SimpleFieldSet into this builder.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 8 Apr 2011 13:59:10 +0000 (15:59 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 8 Apr 2011 13:59:10 +0000 (15:59 +0200)
src/main/java/net/pterodactylus/sone/freenet/SimpleFieldSetBuilder.java

index f440e50..1d57454 100644 (file)
@@ -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.
         *