contains为判断String类型是否包含字符串
containsKey为JSONObject是否包含某个key
/**
* Returns true if and only if this string contains the specified
* sequence of char values.
*
* @param s the sequence to search for
* @return true if this string contains {@code s}, false otherwise
* @since 1.5
*/
public boolean contains(CharSequence s) {
return indexOf(s.toString()) > -1;
}
public boolean containsKey(Object key) {
return this.map.containsKey(key);
}