public static class JsonObject.Builder extends Object
JsonObject from keys and values configured by put* methods.| Modifier and Type | Method and Description |
|---|---|
JsonObject |
build()
Returns a
JsonObject that is built from keys and values configured by put* methods. |
JsonObject.Builder |
put(JsonString key,
JsonValue value)
Puts a pair of a
JsonString key and a JsonValue value. |
JsonObject.Builder |
put(String key,
JsonValue value)
|
JsonObject.Builder |
putAll(Map<String,JsonValue> map)
Copies all of the JSON key-value mappings from the specified
Map to this JSON object. |
JsonObject.Builder |
putAllWithJsonStringKeys(Map<JsonString,JsonValue> map)
Copies all of the JSON key-value mappings from the specified
Map to this JSON object. |
JsonObject.Builder |
putEntry(Map.Entry<String,JsonValue> entry)
|
JsonObject.Builder |
putEntryWithJsonStringKey(Map.Entry<JsonString,JsonValue> entry)
|
public JsonObject build()
JsonObject that is built from keys and values configured by put* methods.JsonObject that is built from keys and values configured by put* methodspublic JsonObject.Builder put(String key, JsonValue value)
key - the key, not nullvalue - the value, not nullNullPointerException - if the key or the value is nullpublic JsonObject.Builder put(JsonString key, JsonValue value)
JsonString key and a JsonValue value.key - the key, not nullvalue - the value, not nullNullPointerException - if the key or the value is nullpublic JsonObject.Builder putEntry(Map.Entry<String,JsonValue> entry)
entry - an entry of a key and a value, not nullNullPointerException - if the key or the value is nullpublic JsonObject.Builder putEntryWithJsonStringKey(Map.Entry<JsonString,JsonValue> entry)
entry - an entry of a key and a value, not nullNullPointerException - if the key or the value is nullpublic JsonObject.Builder putAll(Map<String,JsonValue> map)
Map to this JSON object.map - a Map, not nullNullPointerException - if the map, the key or the value is nullpublic JsonObject.Builder putAllWithJsonStringKeys(Map<JsonString,JsonValue> map)
Map to this JSON object.map - a Map, not nullNullPointerException - if the map, the key or the value is null