Skip to content

Commit 35ca898

Browse files
committed
Added reference for JSONObject methods setInt(), setFloat(), setString(), and setBoolean()
1 parent 09bf73c commit 35ca898

1 file changed

Lines changed: 14 additions & 10 deletions

File tree

core/src/processing/data/JSONObject.java

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,7 +1114,9 @@ private void populateMap(Object bean) {
11141114

11151115
/**
11161116
* @webref jsonobject:method
1117-
* @brief To come...
1117+
* @brief Put a key/String pair in the JSONObject
1118+
* @param key a key string
1119+
* @param value the value to assign
11181120
*/
11191121
public JSONObject setString(String key, String value) {
11201122
return put(key, value);
@@ -1124,12 +1126,12 @@ public JSONObject setString(String key, String value) {
11241126
/**
11251127
* Put a key/int pair in the JSONObject.
11261128
*
1127-
* @param key A key string.
1128-
* @param value An int which is the value.
1129-
* @return this.
1130-
* @throws JSONException If the key is null.
11311129
* @webref jsonobject:method
11321130
* @brief Put a key/int pair in the JSONObject
1131+
* @param key a key string
1132+
* @param value the value to assign
1133+
* @return this.
1134+
* @throws JSONException If the key is null.
11331135
*/
11341136
public JSONObject setInt(String key, int value) {
11351137
this.put(key, new Integer(value));
@@ -1152,7 +1154,9 @@ public JSONObject setLong(String key, long value) {
11521154

11531155
/**
11541156
* @webref jsonobject:method
1155-
* @brief To come...
1157+
* @brief Put a key/float pair in the JSONObject
1158+
* @param key a key string
1159+
* @param value the value to assign
11561160
*/
11571161
public JSONObject setFloat(String key, float value) {
11581162
this.put(key, new Double(value));
@@ -1177,12 +1181,12 @@ public JSONObject setDouble(String key, double value) {
11771181
/**
11781182
* Put a key/boolean pair in the JSONObject.
11791183
*
1180-
* @param key A key string.
1181-
* @param value A boolean which is the value.
1182-
* @return this.
1183-
* @throws JSONException If the key is null.
11841184
* @webref jsonobject:method
11851185
* @brief Put a key/boolean pair in the JSONObject
1186+
* @param key a key string
1187+
* @param value the value to assign
1188+
* @return this.
1189+
* @throws JSONException If the key is null.
11861190
*/
11871191
public JSONObject setBoolean(String key, boolean value) {
11881192
this.put(key, value ? Boolean.TRUE : Boolean.FALSE);

0 commit comments

Comments
 (0)