com.sigopt.model.APIObject Maven / Gradle / Ivy
package com.sigopt.model;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.google.gson.FieldNamingPolicy;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import java.lang.reflect.Type;
public abstract class APIObject {
Map model;
public APIObject() {
this.model = new HashMap();
}
final protected Object mapGet(String key) {
return this.model.get(key);
}
private Object adaptForStorage(Object value) {
if (value instanceof APIObject) {
return ((APIObject) value).model;
} else if (value instanceof Collection) {
List