Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3C2B9200C31 for ; Wed, 8 Mar 2017 08:41:33 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 3AD2C160B83; Wed, 8 Mar 2017 07:41:33 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 84AF9160B75 for ; Wed, 8 Mar 2017 08:41:32 +0100 (CET) Received: (qmail 8343 invoked by uid 500); 8 Mar 2017 07:41:31 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 8334 invoked by uid 99); 8 Mar 2017 07:41:31 -0000 Received: from Unknown (HELO svn01-us-west.apache.org) (209.188.14.144) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Mar 2017 07:41:31 +0000 Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 11E463A3BA7 for ; Wed, 8 Mar 2017 07:41:30 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: scm@geronimo.apache.org From: struberg@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20170308074131.11E463A3BA7@svn01-us-west.apache.org> archived-at: Wed, 08 Mar 2017 07:41:33 -0000 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 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 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(); + } }