JsonSerializable.getCollection 方法
定义
重载
getCollection(String propertyName) |
Gets a JSONObject collection.
|
getCollection(String propertyName, Class<T> c) |
Gets an object collection.
|
getCollection(String propertyName)
Gets a JSONObject collection.
public Collection<JSONObject> getCollection(String propertyName)
参数
- propertyName
- String
the property to get.
返回
Collection<JSONObject>
the JSONObject collection.
getCollection(String propertyName, Class<T> c)
Gets an object collection.
public <T extends Object> Collection<T> getCollection(String propertyName, Class<T> c)
参数
- propertyName
- String
the property to get
- c
- Class<T>
the class of the object. If c is a POJO class, it must be a member (and not an anonymous or local) and a static one.
返回
<T extends Object> Collection<T>
the object collection.