Class ImmutableProjectJSON
java.lang.Object
org.json.JSONObject
ca.phon.project.ImmutableProjectJSON
public class ImmutableProjectJSON
extends org.json.JSONObject
Immutable wrapper for a project JSON object.
This class is used to provide read-only access to the project JSON
while preventing any modifications.
-
Field Summary
Fields inherited from class org.json.JSONObject
NULL
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.json.JSONObject
accumulate
(String key, Object value) org.json.JSONObject
void
clear()
entrySet()
getBigDecimal
(String key) getBigInteger
(String key) boolean
getBoolean
(String key) double
<E extends Enum<E>>
Efloat
int
org.json.JSONArray
getJSONArray
(String key) org.json.JSONObject
getJSONObject
(String key) long
boolean
org.json.JSONObject
boolean
isEmpty()
boolean
keys()
keySet()
int
length()
org.json.JSONArray
names()
optBigDecimal
(String key, BigDecimal defaultValue) optBigInteger
(String key, BigInteger defaultValue) boolean
optBoolean
(String key) boolean
optBoolean
(String key, boolean defaultValue) optBooleanObject
(String key) optBooleanObject
(String key, Boolean defaultValue) double
double
optDoubleObject
(String key) optDoubleObject
(String key, Double defaultValue) <E extends Enum<E>>
E<E extends Enum<E>>
Efloat
float
optFloatObject
(String key) optFloatObject
(String key, Float defaultValue) int
int
optIntegerObject
(String key) optIntegerObject
(String key, Integer defaultValue) org.json.JSONArray
optJSONArray
(String key) org.json.JSONArray
optJSONArray
(String key, org.json.JSONArray defaultValue) org.json.JSONObject
optJSONObject
(String key) org.json.JSONObject
optJSONObject
(String key, org.json.JSONObject defaultValue) long
long
optLongObject
(String key) optLongObject
(String key, Long defaultValue) optQuery
(org.json.JSONPointer jsonPointer) org.json.JSONObject
org.json.JSONObject
org.json.JSONObject
org.json.JSONObject
org.json.JSONObject
org.json.JSONObject
org.json.JSONObject
put
(String key, Collection<?> value) org.json.JSONObject
org.json.JSONObject
org.json.JSONObject
query
(org.json.JSONPointer jsonPointer) boolean
org.json.JSONArray
toJSONArray
(org.json.JSONArray names) toMap()
toString()
toString
(int indentFactor) Methods inherited from class org.json.JSONObject
doubleToString, getNames, getNames, isDecimalNotation, numberToString, quote, quote, stringToNumber, stringToValue, testValidity, valueToString, wrap
-
Constructor Details
-
ImmutableProjectJSON
public ImmutableProjectJSON(org.json.JSONObject projectJson)
-
-
Method Details
-
getMapType
-
accumulate
-
append
-
get
-
getEnum
-
getBoolean
- Overrides:
getBoolean
in classorg.json.JSONObject
- Throws:
org.json.JSONException
-
getBigInteger
- Overrides:
getBigInteger
in classorg.json.JSONObject
- Throws:
org.json.JSONException
-
getBigDecimal
- Overrides:
getBigDecimal
in classorg.json.JSONObject
- Throws:
org.json.JSONException
-
getDouble
- Overrides:
getDouble
in classorg.json.JSONObject
- Throws:
org.json.JSONException
-
getFloat
- Overrides:
getFloat
in classorg.json.JSONObject
- Throws:
org.json.JSONException
-
getNumber
-
getInt
- Overrides:
getInt
in classorg.json.JSONObject
- Throws:
org.json.JSONException
-
getJSONArray
- Overrides:
getJSONArray
in classorg.json.JSONObject
- Throws:
org.json.JSONException
-
getJSONObject
- Overrides:
getJSONObject
in classorg.json.JSONObject
- Throws:
org.json.JSONException
-
getLong
- Overrides:
getLong
in classorg.json.JSONObject
- Throws:
org.json.JSONException
-
getString
-
has
- Overrides:
has
in classorg.json.JSONObject
-
increment
- Overrides:
increment
in classorg.json.JSONObject
- Throws:
org.json.JSONException
-
isNull
- Overrides:
isNull
in classorg.json.JSONObject
-
keys
-
keySet
-
entrySet
-
length
public int length()- Overrides:
length
in classorg.json.JSONObject
-
clear
public void clear()- Overrides:
clear
in classorg.json.JSONObject
-
isEmpty
public boolean isEmpty()- Overrides:
isEmpty
in classorg.json.JSONObject
-
names
public org.json.JSONArray names()- Overrides:
names
in classorg.json.JSONObject
-
opt
-
optEnum
-
optEnum
-
optBoolean
- Overrides:
optBoolean
in classorg.json.JSONObject
-
optBoolean
- Overrides:
optBoolean
in classorg.json.JSONObject
-
optBooleanObject
-
optBooleanObject
-
optBigDecimal
- Overrides:
optBigDecimal
in classorg.json.JSONObject
-
optBigInteger
- Overrides:
optBigInteger
in classorg.json.JSONObject
-
optDouble
- Overrides:
optDouble
in classorg.json.JSONObject
-
optDouble
- Overrides:
optDouble
in classorg.json.JSONObject
-
optDoubleObject
-
optDoubleObject
-
optFloat
- Overrides:
optFloat
in classorg.json.JSONObject
-
optFloat
- Overrides:
optFloat
in classorg.json.JSONObject
-
optFloatObject
-
optFloatObject
-
optInt
- Overrides:
optInt
in classorg.json.JSONObject
-
optInt
- Overrides:
optInt
in classorg.json.JSONObject
-
optIntegerObject
-
optIntegerObject
-
optJSONArray
- Overrides:
optJSONArray
in classorg.json.JSONObject
-
optJSONArray
- Overrides:
optJSONArray
in classorg.json.JSONObject
-
optJSONObject
- Overrides:
optJSONObject
in classorg.json.JSONObject
-
optJSONObject
- Overrides:
optJSONObject
in classorg.json.JSONObject
-
optLong
- Overrides:
optLong
in classorg.json.JSONObject
-
optLong
- Overrides:
optLong
in classorg.json.JSONObject
-
optLongObject
-
optLongObject
-
optNumber
-
optNumber
-
optString
-
optString
-
put
- Overrides:
put
in classorg.json.JSONObject
- Throws:
org.json.JSONException
-
put
- Overrides:
put
in classorg.json.JSONObject
- Throws:
org.json.JSONException
-
put
- Overrides:
put
in classorg.json.JSONObject
- Throws:
org.json.JSONException
-
put
- Overrides:
put
in classorg.json.JSONObject
- Throws:
org.json.JSONException
-
put
- Overrides:
put
in classorg.json.JSONObject
- Throws:
org.json.JSONException
-
put
- Overrides:
put
in classorg.json.JSONObject
- Throws:
org.json.JSONException
-
put
-
put
-
putOnce
-
putOpt
-
query
-
query
- Overrides:
query
in classorg.json.JSONObject
-
optQuery
-
optQuery
- Overrides:
optQuery
in classorg.json.JSONObject
-
remove
-
similar
- Overrides:
similar
in classorg.json.JSONObject
-
toJSONArray
public org.json.JSONArray toJSONArray(org.json.JSONArray names) throws org.json.JSONException - Overrides:
toJSONArray
in classorg.json.JSONObject
- Throws:
org.json.JSONException
-
toString
- Overrides:
toString
in classorg.json.JSONObject
-
toString
- Overrides:
toString
in classorg.json.JSONObject
- Throws:
org.json.JSONException
-
write
-
write
-
toMap
-