Package cn.leancloud.gson
Class GsonObject
java.lang.Object
cn.leancloud.json.JSONObject
cn.leancloud.gson.GsonObject
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,Object>
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class cn.leancloud.json.JSONObject
JSONObject.Builder -
Constructor Summary
ConstructorsConstructorDescriptionGsonObject(com.google.gson.JsonObject object) GsonObject(Map<String, Object> map) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()clone()booleancontainsKey(Object key) booleanentrySet()booleanfluentPutAll(Map<? extends String, ? extends Object> m) getBigDecimal(String key) getBigInteger(String key) getBoolean(String key) booleangetBooleanValue(String key) byte[]bytegetByteValue(String key) doublegetDoubleValue(String key) floatgetFloatValue(String key) getInteger(String key) intgetIntValue(String key) getJSONArray(String key) getJSONObject(String key) longgetLongValue(String key) <T> TgetObject(String key, TypeReference typeReference) <T> T<T> Tget object value with specified key.com.google.gson.JsonObjectshortgetShortValue(String key) getSqlDate(String key) getTimestamp(String key) inthashCode()booleanisEmpty()keySet()voidintsize()<T> TtoJavaObject(Class<T> clazz) values()Methods inherited from class cn.leancloud.json.JSONObject
toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
GsonObject
public GsonObject(com.google.gson.JsonObject object) -
GsonObject
-
GsonObject
public GsonObject()
-
-
Method Details
-
getRawObject
public com.google.gson.JsonObject getRawObject() -
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
-
containsValue
-
get
-
getJSONObject
- Specified by:
getJSONObjectin classJSONObject
-
getJSONArray
- Specified by:
getJSONArrayin classJSONObject
-
getObject
- Specified by:
getObjectin classJSONObject
-
getObject
get object value with specified key.- Specified by:
getObjectin classJSONObject- Type Parameters:
T- generic type- Parameters:
key- attr keytype- attr type- Returns:
- attr value
- Since:
- 1.8
-
getObject
- Specified by:
getObjectin classJSONObject
-
getBoolean
- Specified by:
getBooleanin classJSONObject
-
getBytes
- Specified by:
getBytesin classJSONObject
-
getBooleanValue
- Specified by:
getBooleanValuein classJSONObject
-
getByte
- Specified by:
getBytein classJSONObject
-
getByteValue
- Specified by:
getByteValuein classJSONObject
-
getShort
- Specified by:
getShortin classJSONObject
-
getShortValue
- Specified by:
getShortValuein classJSONObject
-
getInteger
- Specified by:
getIntegerin classJSONObject
-
getIntValue
- Specified by:
getIntValuein classJSONObject
-
getLong
- Specified by:
getLongin classJSONObject
-
getLongValue
- Specified by:
getLongValuein classJSONObject
-
getFloat
- Specified by:
getFloatin classJSONObject
-
getFloatValue
- Specified by:
getFloatValuein classJSONObject
-
getDouble
- Specified by:
getDoublein classJSONObject
-
getDoubleValue
- Specified by:
getDoubleValuein classJSONObject
-
getBigDecimal
- Specified by:
getBigDecimalin classJSONObject
-
getBigInteger
- Specified by:
getBigIntegerin classJSONObject
-
getString
- Specified by:
getStringin classJSONObject
-
getDate
- Specified by:
getDatein classJSONObject
-
getSqlDate
- Specified by:
getSqlDatein classJSONObject
-
getTimestamp
- Specified by:
getTimestampin classJSONObject
-
put
-
fluentPut
- Specified by:
fluentPutin classJSONObject
-
putAll
-
fluentPutAll
- Specified by:
fluentPutAllin classJSONObject
-
clear
public void clear() -
fluentClear
- Specified by:
fluentClearin classJSONObject
-
remove
-
keySet
-
values
-
entrySet
-
clone
-
getInnerMap
- Specified by:
getInnerMapin classJSONObject
-
toJavaObject
- Specified by:
toJavaObjectin classJSONObject
-
hashCode
public int hashCode() -
equals
-
toJSONString
- Specified by:
toJSONStringin classJSONObject
-