@Deprecated public abstract class AbstractUnmodifiableJSONObject extends java.lang.Object implements JSONObject
EMPTY| Constructor and Description |
|---|
AbstractUnmodifiableJSONObject()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
JSONObject |
put(java.lang.String key,
boolean value)
Deprecated.
Put a key/boolean pair in the JSONObject.
|
JSONObject |
put(java.lang.String key,
double value)
Deprecated.
Put a key/double pair in the JSONObject.
|
JSONObject |
put(java.lang.String key,
int value)
Deprecated.
Put a key/int pair in the JSONObject.
|
JSONObject |
put(java.lang.String key,
long value)
Deprecated.
Put a key/long pair in the JSONObject.
|
JSONObject |
put(java.lang.String key,
java.lang.Object value)
Deprecated.
Put a key/value pair in the JSONObject.
|
JSONObject |
putOnce(java.lang.String key,
java.lang.Object value)
Deprecated.
Put a key/value pair in the JSONObject, but only if the key and the value are both non-null,
and only if there is not already a member with that name.
|
JSONObject |
putOpt(java.lang.String key,
java.lang.Object value)
Deprecated.
Put a key/value pair in the JSONObject, but only if the key and the value are both non-null.
|
java.lang.Object |
remove(java.lang.String key)
Deprecated.
Remove a name and its value, if present.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclone, equalsMap, get, getBoolean, getDouble, getDoubleObj, getInt, getJSONArray, getJSONObject, getLong, getString, has, isNull, keys, length, opt, optBoolean, optBoolean, optDouble, optDouble, optDoubleObj, optInt, optInt, optInteger, optInteger, optJSONArray, optJSONObject, optLong, optLong, optString, optString, sortedKeystoString, toString, toString, writepublic AbstractUnmodifiableJSONObject()
public final JSONObject put(java.lang.String key, boolean value) throws JSONException
JSONObjectput in interface JSONObjectkey - A key string.value - A boolean which is the value.JSONException - If the key is null.public final JSONObject put(java.lang.String key, double value) throws JSONException
JSONObjectput in interface JSONObjectkey - A key string.value - A double which is the value.JSONException - If the key is null or if the number is invalid.public final JSONObject put(java.lang.String key, int value) throws JSONException
JSONObjectput in interface JSONObjectkey - A key string.value - An int which is the value.JSONException - If the key is null.public final JSONObject put(java.lang.String key, long value) throws JSONException
JSONObjectput in interface JSONObjectkey - A key string.value - A long which is the value.JSONException - If the key is null.public final JSONObject put(java.lang.String key, java.lang.Object value) throws JSONException
JSONObjectput in interface JSONObjectkey - A key string.value - An object which is the value. It should be of one of these types: Boolean, Double,
Integer, JSONArray, JSONObject, Long, String, or the JSONObject.NULL object.JSONException - If the value is non-finite number or if the key is null.public final JSONObject putOnce(java.lang.String key, java.lang.Object value) throws JSONException
JSONObjectputOnce in interface JSONObjectJSONException - if the key is a duplicatepublic final JSONObject putOpt(java.lang.String key, java.lang.Object value) throws JSONException
JSONObjectputOpt in interface JSONObjectkey - A key string.value - An object which is the value. It should be of one of these types: Boolean, Double,
Integer, JSONArray, JSONObject, Long, String, or the JSONObject.NULL object.JSONException - If the value is a non-finite number.public final java.lang.Object remove(java.lang.String key)
JSONObjectremove in interface JSONObjectkey - The name to be removed.