more notes and get()/put() stuff with JSON

This commit is contained in:
Ben Fry
2016-10-29 11:07:59 -04:00
parent e847d62813
commit b2f7fddaa5
3 changed files with 12 additions and 10 deletions

View File

@@ -897,9 +897,9 @@ public class JSONObject {
/**
* Determine if the value associated with the key is null or if there is
* Determine if the value associated with the key is null or if there is
* no value.
*
*
* @webref
* @param key A key string.
* @return true if there is no value associated with the key or if
@@ -1334,7 +1334,7 @@ public class JSONObject {
* @throws RuntimeException if the key is a duplicate, or if
* {@link #put(String,Object)} throws.
*/
public JSONObject putOnce(String key, Object value) {
private JSONObject putOnce(String key, Object value) {
if (key != null && value != null) {
if (this.opt(key) != null) {
throw new RuntimeException("Duplicate key \"" + key + "\"");