geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1785922 - /geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/JsonBuilderFactory.java
Date Wed, 08 Mar 2017 07:41:30 GMT
Author: struberg
Date: Wed Mar  8 07:41:30 2017
New Revision: 1785922

URL: http://svn.apache.org/viewvc?rev=1785922&view=rev
Log:
GERONIMO-6558 apply latest changes from the spec

Modified:
    geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/JsonBuilderFactory.java

Modified: geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/JsonBuilderFactory.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/JsonBuilderFactory.java?rev=1785922&r1=1785921&r2=1785922&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/JsonBuilderFactory.java
(original)
+++ geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/JsonBuilderFactory.java
Wed Mar  8 07:41:30 2017
@@ -19,10 +19,19 @@ package javax.json;
 import java.util.Map;
 
 public interface JsonBuilderFactory {
+    /**
+     * @return a new empty JsonObjectBuilder
+     */
     JsonObjectBuilder createObjectBuilder();
 
+    /**
+     * @return a new empty JsonArrayBuilder
+     */
     JsonArrayBuilder createArrayBuilder();
 
+    /**
+     * @return the config which got used when creating this builder factory.
+     */
     Map<String, ?> getConfigInUse();
 
     /**
@@ -30,6 +39,8 @@ public interface JsonBuilderFactory {
      *
      * @throws NullPointerException if initialData is {@code null}
      *
+     * @return a new pre initialised JsonObjectBuilder
+     *
      * @since 1.1
      */
     default JsonObjectBuilder createObjectBuilder(JsonObject initialData) {
@@ -37,14 +48,42 @@ public interface JsonBuilderFactory {
     }
 
     /**
+     * Create a JsonObjectBuilder filled with the given initial data.
+     *
+     * @throws NullPointerException if initialData is {@code null}
+     *
+     * @return a new pre initialised JsonObjectBuilder
+     *
+     * @since 1.1
+     */
+    default JsonObjectBuilder createObjectBuilder(Map<String, Object> initialData)
{
+        throw new UnsupportedOperationException();
+    }
+
+    /**
      * Create a JsonArrayBuilder filled with the given initial data.
      *
      * @throws NullPointerException if initialData is {@code null}
      *
+     * @return a new pre initialised JsonArrayBuilder
+     *
      * @since 1.1
      */
     default JsonArrayBuilder createArrayBuilder(JsonArray initialData) {
         throw new UnsupportedOperationException();
     }
+
+    /**
+     * Create a {@link JsonArrayBuilder} which is filled with the given initial content.
+     * @param initialData the content to immediately add to the JsonArrayBuilder
+     *
+     * @throws NullPointerException if initialData is {@code null}
+     *
+     * @return a new pre initialised JsonArrayBuilder
+     * @since 1.1
+     */
+    default JsonArrayBuilder createArrayBuilder(java.util.Collection<?> initialData)
{
+        throw new UnsupportedOperationException();
+    }
 }
 



Mime
View raw message