Package net.bitnine.agensgraph.util
Class JsonbObjectBuilder
java.lang.Object
net.bitnine.agensgraph.util.JsonbObjectBuilder
A builder for creating Jsonb object.
This class initializes a Jsonb object and provides methods to add name/value pairs to the object
and to return the resulting object.
The methods in this class can be chained to add multiple name/value pairs to the object.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a name/boolean pair to the Jsonb object associated with this object builder.Adds a name/double pair to the Jsonb object associated with this object builder.Adds a name/long pair to the Jsonb object associated with this object builder.Adds a name/object pair to the Jsonb object associated with this object builder.Adds a name/string pair to the Jsonb object associated with this object builder.Adds a name/Jsonb pair to the Jsonb object associated with this object builder.add(String name, JsonbArrayBuilder builder) Adds a name/JsonbArray pair to the Jsonb object associated with this object builder.add(String name, JsonbObjectBuilder builder) Adds a name/JsonbObject pair to the Jsonb object associated with this object builder.Adds a name/null pair to the Jsonb object associated with this object builder where the value is null.build()Returns the Jsonb object associated with this object builder.
-
Constructor Details
-
JsonbObjectBuilder
public JsonbObjectBuilder()Initializes a Jsonb object.
-
-
Method Details
-
add
Adds a name/string pair to the Jsonb object associated with this object builder. If the object contains a mapping for the specified name, this method replaces the old value with the specified value.- Parameters:
name- name in the name/value pairvalue- value in the name/value pair- Returns:
- this object builder
-
add
Adds a name/long pair to the Jsonb object associated with this object builder. If the object contains a mapping for the specified name, this method replaces the old value with the specified value.- Parameters:
name- name in the name/value pairvalue- value in the name/value pair- Returns:
- this object builder
-
add
Adds a name/double pair to the Jsonb object associated with this object builder. If the object contains a mapping for the specified name, this method replaces the old value with the specified value.- Parameters:
name- name in the name/value pairvalue- value in the name/value pair- Returns:
- this object builder
-
add
Adds a name/boolean pair to the Jsonb object associated with this object builder. If the object contains a mapping for the specified name, this method replaces the old value with the specified value.- Parameters:
name- name in the name/value pairvalue- value in the name/value pair- Returns:
- this object builder
-
addNull
Adds a name/null pair to the Jsonb object associated with this object builder where the value is null. If the object contains a mapping for the specified name, this method replaces the old value with null.- Parameters:
name- name in the name/value pair- Returns:
- this object builder
-
add
Adds a name/Jsonb pair to the Jsonb object associated with this object builder. If the object contains a mapping for the specified name, this method replaces the old value with the Jsonb.- Parameters:
name- name in the name/value pairj- the value is the object associated with Jsonb- Returns:
- this object builder
-
add
Adds a name/object pair to the Jsonb object associated with this object builder. If the object contains a mapping for the specified name, this method replaces the old value with the object.- Parameters:
name- name in the name/value pairvalue- the value is the object- Returns:
- this object builder
-
add
Adds a name/JsonbArray pair to the Jsonb object associated with this object builder. If the object contains a mapping for the specified name, this method replaces the old value with JsonbArray.- Parameters:
name- name in the name/value pairbuilder- the value is the object array with this builder- Returns:
- this object builder
-
add
Adds a name/JsonbObject pair to the Jsonb object associated with this object builder. If the object contains a mapping for the specified name, this method replaces the old value with JsonbObject.- Parameters:
name- name in the name/value pairbuilder- the value is the object associated with this builder- Returns:
- this object builder
-
build
Returns the Jsonb object associated with this object builder.- Returns:
- the Jsonb object that is being built
-