Skip to content

Commit 4063f3c

Browse files
committed
Added related reference links to JSONObject methods
1 parent 266f145 commit 4063f3c

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

core/src/processing/data/JSONObject.java

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,9 @@ private Object get(String key) {
560560
* @param key a key string
561561
* @return A string which is the value.
562562
* @throws JSONException if there is no string value for the key.
563+
* @see JSONObject#getInt(String)
564+
* @see JSONObject#getFloat(String)
565+
* @see JSONObject#getBoolean(String)
563566
*/
564567
public String getString(String key) {
565568
Object object = this.get(key);
@@ -579,6 +582,9 @@ public String getString(String key) {
579582
* @return The integer value.
580583
* @throws JSONException if the key is not found or if the value cannot
581584
* be converted to an integer.
585+
* @see JSONObject#getFloat(String)
586+
* @see JSONObject#getString(String)
587+
* @see JSONObject#getBoolean(String)
582588
*/
583589
public int getInt(String key) {
584590
Object object = this.get(key);
@@ -615,6 +621,9 @@ public long getLong(String key) {
615621
* @webref jsonobject:method
616622
* @brief Gets the float value associated with a key
617623
* @param key a key string
624+
* @see JSONObject#getInt(String)
625+
* @see JSONObject#getString(String)
626+
* @see JSONObject#getBoolean(String)
618627
*/
619628
public float getFloat(String key) {
620629
return (float) getDouble(key);
@@ -648,6 +657,9 @@ public double getDouble(String key) {
648657
* @param key a key string
649658
* @return The truth.
650659
* @throws JSONException if the value is not a Boolean or the String "true" or "false".
660+
* @see JSONObject#getInt(String)
661+
* @see JSONObject#getFloat(String)
662+
* @see JSONObject#getString(String)
651663
*/
652664
public boolean getBoolean(String key) {
653665
Object object = this.get(key);
@@ -672,6 +684,9 @@ public boolean getBoolean(String key) {
672684
* @param key a key string
673685
* @return A JSONArray which is the value.
674686
* @throws JSONException if the key is not found or if the value is not a JSONArray.
687+
* @see JSONObject#getJSONObject(String)
688+
* @see JSONObject#setJSONObject(String, JSONObject)
689+
* @see JSONObject#setJSONArray(String, JSONArray)
675690
*/
676691
public JSONArray getJSONArray(String key) {
677692
Object object = this.get(key);
@@ -690,6 +705,9 @@ public JSONArray getJSONArray(String key) {
690705
* @param key a key string
691706
* @return A JSONObject which is the value.
692707
* @throws JSONException if the key is not found or if the value is not a JSONObject.
708+
* @see JSONObject#getJSONArray(String)
709+
* @see JSONObject#setJSONObject(String, JSONObject)
710+
* @see JSONObject#setJSONArray(String, JSONArray)
693711
*/
694712
public JSONObject getJSONObject(String key) {
695713
Object object = this.get(key);
@@ -1117,6 +1135,9 @@ private void populateMap(Object bean) {
11171135
* @brief Put a key/String pair in the JSONObject
11181136
* @param key a key string
11191137
* @param value the value to assign
1138+
* @see JSONObject#setInt(String, int)
1139+
* @see JSONObject#setFloat(String, float)
1140+
* @see JSONObject#setBoolean(String, boolean)
11201141
*/
11211142
public JSONObject setString(String key, String value) {
11221143
return put(key, value);
@@ -1132,6 +1153,9 @@ public JSONObject setString(String key, String value) {
11321153
* @param value the value to assign
11331154
* @return this.
11341155
* @throws JSONException If the key is null.
1156+
* @see JSONObject#setFloat(String, float)
1157+
* @see JSONObject#setString(String, String)
1158+
* @see JSONObject#setBoolean(String, boolean)
11351159
*/
11361160
public JSONObject setInt(String key, int value) {
11371161
this.put(key, new Integer(value));
@@ -1157,6 +1181,9 @@ public JSONObject setLong(String key, long value) {
11571181
* @brief Put a key/float pair in the JSONObject
11581182
* @param key a key string
11591183
* @param value the value to assign
1184+
* @see JSONObject#setInt(String, int)
1185+
* @see JSONObject#setString(String, String)
1186+
* @see JSONObject#setBoolean(String, boolean)
11601187
*/
11611188
public JSONObject setFloat(String key, float value) {
11621189
this.put(key, new Double(value));
@@ -1187,6 +1214,9 @@ public JSONObject setDouble(String key, double value) {
11871214
* @param value the value to assign
11881215
* @return this.
11891216
* @throws JSONException If the key is null.
1217+
* @see JSONObject#setInt(String, int)
1218+
* @see JSONObject#setFloat(String, float)
1219+
* @see JSONObject#setString(String, String)
11901220
*/
11911221
public JSONObject setBoolean(String key, boolean value) {
11921222
this.put(key, value ? Boolean.TRUE : Boolean.FALSE);
@@ -1198,6 +1228,9 @@ public JSONObject setBoolean(String key, boolean value) {
11981228
* @brief Sets the JSONObject value associated with a key
11991229
* @param key a key string
12001230
* @param value value to assign
1231+
* @see JSONObject#setJSONArray(String, JSONArray)
1232+
* @see JSONObject#getJSONObject(String)
1233+
* @see JSONObject#getJSONArray(String)
12011234
*/
12021235
public JSONObject setJSONObject(String key, JSONObject value) {
12031236
return put(key, value);
@@ -1208,6 +1241,9 @@ public JSONObject setJSONObject(String key, JSONObject value) {
12081241
* @brief Sets the JSONArray value associated with a key
12091242
* @param key a key string
12101243
* @param value value to assign
1244+
* @see JSONObject#setJSONObject(String, JSONObject)
1245+
* @see JSONObject#getJSONObject(String)
1246+
* @see JSONObject#getJSONArray(String)
12111247
*/
12121248
public JSONObject setJSONArray(String key, JSONArray value) {
12131249
return put(key, value);

0 commit comments

Comments
 (0)