Class JsonObjectBuilderImpl
- java.lang.Object
-
- org.apache.activemq.artemis.json.impl.JsonObjectBuilderImpl
-
- All Implemented Interfaces:
JsonObjectBuilder
public class JsonObjectBuilderImpl extends java.lang.Object implements JsonObjectBuilder
-
-
Constructor Summary
Constructors Constructor Description JsonObjectBuilderImpl(javax.json.JsonObjectBuilder rawObjectBuilder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonObjectBuilderadd(java.lang.String name, boolean value)Add the given boolean value to the JsonObject to be created.JsonObjectBuilderadd(java.lang.String name, double value)Add the given double value to the JsonObject to be created.JsonObjectBuilderadd(java.lang.String name, int value)Add the given int value to the JsonObject to be created.JsonObjectBuilderadd(java.lang.String name, long value)Add the given long value to the JsonObject to be created.JsonObjectBuilderadd(java.lang.String name, java.lang.String value)Add the given String value to the JsonObject to be created.JsonObjectBuilderadd(java.lang.String name, java.lang.String value, JsonValue defaultValue)JsonObjectBuilderadd(java.lang.String name, java.math.BigDecimal value)Add the given BigDecimal value to the JsonObject to be created.JsonObjectBuilderadd(java.lang.String name, java.math.BigDecimal value, JsonValue defaultValue)JsonObjectBuilderadd(java.lang.String name, java.math.BigInteger value)Add the given BigInteger value to the JsonObject to be created.JsonObjectBuilderadd(java.lang.String name, java.math.BigInteger value, JsonValue defaultValue)JsonObjectBuilderadd(java.lang.String name, JsonArrayBuilder builder)Use the givenJsonArrayBuilderto create aJsonArraywhich will be added to the JsonObject to be created by this builder.JsonObjectBuilderadd(java.lang.String name, JsonObjectBuilder builder)Use the givenJsonObjectBuilderto create aJsonObjectwhich will be added to the JsonObject to be created by this builder.JsonObjectBuilderadd(java.lang.String name, JsonValue value)Add the given JsonValue value to the JsonObject to be created.JsonObjectBuilderaddNull(java.lang.String name)Add aJsonValue.NULLvalue to the JsonObject to be created.JsonObjectbuild()javax.json.JsonObjectBuildergetRawObjectBuilder()JsonObjectBuilderremove(java.lang.String name)Remove the attribute with the given name from the builder.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.activemq.artemis.json.JsonObjectBuilder
addAll
-
-
-
-
Method Detail
-
getRawObjectBuilder
public javax.json.JsonObjectBuilder getRawObjectBuilder()
-
add
public JsonObjectBuilder add(java.lang.String name, JsonValue value)
Description copied from interface:JsonObjectBuilderAdd the given JsonValue value to the JsonObject to be created. If a value with that name already exists it will be replaced by the new value.- Specified by:
addin interfaceJsonObjectBuilder- Parameters:
name- the JSON attribute namevalue- the JsonValue to add- Returns:
- the current JsonObjectBuilder
-
add
public JsonObjectBuilder add(java.lang.String name, java.lang.String value)
Description copied from interface:JsonObjectBuilderAdd the given String value to the JsonObject to be created. If a value with that name already exists it will be replaced by the new value.- Specified by:
addin interfaceJsonObjectBuilder- Parameters:
name- the JSON attribute namevalue- the String value to add- Returns:
- the current JsonObjectBuilder
-
add
public JsonObjectBuilder add(java.lang.String name, java.lang.String value, JsonValue defaultValue)
- Specified by:
addin interfaceJsonObjectBuilder
-
add
public JsonObjectBuilder add(java.lang.String name, java.math.BigInteger value)
Description copied from interface:JsonObjectBuilderAdd the given BigInteger value to the JsonObject to be created. If a value with that name already exists it will be replaced by the new value.- Specified by:
addin interfaceJsonObjectBuilder- Parameters:
name- the JSON attribute namevalue- the BigInteger value to add- Returns:
- the current JsonObjectBuilder
-
add
public JsonObjectBuilder add(java.lang.String name, java.math.BigInteger value, JsonValue defaultValue)
- Specified by:
addin interfaceJsonObjectBuilder
-
add
public JsonObjectBuilder add(java.lang.String name, java.math.BigDecimal value)
Description copied from interface:JsonObjectBuilderAdd the given BigDecimal value to the JsonObject to be created. If a value with that name already exists it will be replaced by the new value.- Specified by:
addin interfaceJsonObjectBuilder- Parameters:
name- the JSON attribute namevalue- the BigDecimal value to add- Returns:
- the current JsonObjectBuilder
-
add
public JsonObjectBuilder add(java.lang.String name, java.math.BigDecimal value, JsonValue defaultValue)
- Specified by:
addin interfaceJsonObjectBuilder
-
add
public JsonObjectBuilder add(java.lang.String name, int value)
Description copied from interface:JsonObjectBuilderAdd the given int value to the JsonObject to be created. If a value with that name already exists it will be replaced by the new value.- Specified by:
addin interfaceJsonObjectBuilder- Parameters:
name- the JSON attribute namevalue- to add- Returns:
- the current JsonObjectBuilder
-
add
public JsonObjectBuilder add(java.lang.String name, long value)
Description copied from interface:JsonObjectBuilderAdd the given long value to the JsonObject to be created. If a value with that name already exists it will be replaced by the new value.- Specified by:
addin interfaceJsonObjectBuilder- Parameters:
name- the JSON attribute namevalue- to add- Returns:
- the current JsonObjectBuilder
-
add
public JsonObjectBuilder add(java.lang.String name, double value)
Description copied from interface:JsonObjectBuilderAdd the given double value to the JsonObject to be created. If a value with that name already exists it will be replaced by the new value.- Specified by:
addin interfaceJsonObjectBuilder- Parameters:
name- the JSON attribute namevalue- to add- Returns:
- the current JsonObjectBuilder
-
add
public JsonObjectBuilder add(java.lang.String name, boolean value)
Description copied from interface:JsonObjectBuilderAdd the given boolean value to the JsonObject to be created. If a value with that name already exists it will be replaced by the new value.- Specified by:
addin interfaceJsonObjectBuilder- Parameters:
name- the JSON attribute namevalue- to add- Returns:
- the current JsonObjectBuilder
-
addNull
public JsonObjectBuilder addNull(java.lang.String name)
Description copied from interface:JsonObjectBuilderAdd aJsonValue.NULLvalue to the JsonObject to be created. If a value with that name already exists it will be replaced by the null value.- Specified by:
addNullin interfaceJsonObjectBuilder- Parameters:
name- the JSON attribute name- Returns:
- the current JsonObjectBuilder
-
add
public JsonObjectBuilder add(java.lang.String name, JsonObjectBuilder builder)
Description copied from interface:JsonObjectBuilderUse the givenJsonObjectBuilderto create aJsonObjectwhich will be added to the JsonObject to be created by this builder. If a value with that name already exists it will be replaced by the new value.- Specified by:
addin interfaceJsonObjectBuilder- Parameters:
name- the JSON attribute namebuilder- for creating the JsonObject to add- Returns:
- the current JsonObjectBuilder
-
add
public JsonObjectBuilder add(java.lang.String name, JsonArrayBuilder builder)
Description copied from interface:JsonObjectBuilderUse the givenJsonArrayBuilderto create aJsonArraywhich will be added to the JsonObject to be created by this builder. If a value with that name already exists it will be replaced by the new value.- Specified by:
addin interfaceJsonObjectBuilder- Parameters:
name- the JSON attribute namebuilder- for creating the JsonArray to add- Returns:
- the current JsonObjectBuilder
-
remove
public JsonObjectBuilder remove(java.lang.String name)
Description copied from interface:JsonObjectBuilderRemove the attribute with the given name from the builder.- Specified by:
removein interfaceJsonObjectBuilder
-
build
public JsonObject build()
- Specified by:
buildin interfaceJsonObjectBuilder- Returns:
- a
JsonObjectbased on the added values.
-
-