use of com.tvd12.ezyfoxserver.client.util.EzyArrayToList in project ezyfox-server-android-client by youngmonkeys.
the class EzyArrayList method toList.
/*
* (non-Javadoc)
* @see com.tvd12.ezyfox.entity.EzyRoArray#toList()
*/
@Override
public List toList() {
EzyArrayToList arrayToList = EzyArrayToList.getInstance();
List list = arrayToList.toList(this);
return list;
}
use of com.tvd12.ezyfoxserver.client.util.EzyArrayToList in project ezyfox-server-android-client by youngmonkeys.
the class EzyObjectToMap method toMap.
@SuppressWarnings({ "rawtypes", "unchecked" })
public Map toMap(EzyObject object) {
Map answer = new HashMap<>();
for (Object key : object.keySet()) {
Object value = object.get(key);
Object skey = key;
EzyArrayToList arrayToList = EzyArrayToList.getInstance();
if (key instanceof EzyArray)
skey = arrayToList.toList((EzyArray) key);
else if (key instanceof EzyObject)
skey = toMap((EzyObject) key);
Object svalue = value;
if (value != null) {
if (value instanceof EzyArray)
svalue = arrayToList.toList((EzyArray) value);
if (value instanceof EzyObject)
svalue = toMap((EzyObject) value);
}
answer.put(skey, svalue);
}
return answer;
}
Aggregations