public boolean getBooleanValue(String key) {
   Object value = map.get(key);
   if (value == null) {
     return false;
   }
   return castToBoolean(key);
 }
 public Object opt(String key) {
   if (key == null) {
     return null;
   }
   Object value = map.get(key);
   if (value == NULL) {
     return null;
   }
   return value;
 }
 public JSONObject(Map<?, ?> map) {
   this.map = new HashMap<String, Object>();
   if (map != null) {
     for (final Entry<?, ?> e : map.entrySet()) {
       final Object value = e.getValue();
       if (value != null) {
         this.map.put(String.valueOf(e.getKey()), wrap(value));
       }
     }
   }
 }
 public void putAll(Map<? extends String, ?> m) {
   map.putAll(m);
 }
 public Set<Entry<String, Object>> entrySet() {
   return map.entrySet();
 }
 public Collection<Object> values() {
   return map.values();
 }
 public void clear() {
   map.clear();
 }
 public Boolean getBoolean(String key) {
   Object value = map.get(key);
   return castToBoolean(value);
 }
 public <T> T getObject(String key, Class<T> clazz) {
   Object value = map.get(key);
   return castToJavaBean(value, clazz);
 }
 public boolean containsValue(Object value) {
   return map.containsValue(value);
 }
 public boolean containsKey(String key) {
   return map.containsKey(key);
 }
 public boolean isEmpty() {
   return map.isEmpty();
 }