com.sigopt.model.Utils Maven / Gradle / Ivy
package com.sigopt.model;
import java.util.List;
import java.util.Map;
class Utils {
public static Integer asInteger (Object jsonObject) {
if (jsonObject == null) {
return null;
}
Double d = (Double) jsonObject;
return d.intValue();
}
public static T mergeInto(T t, Object jsonObject) {
if (jsonObject == null) {
return null;
}
Map toSet = (Map) jsonObject;
t.setAll(toSet);
return t;
}
public static List mergeIntoList(List list, Object jsonObject, Class klass) {
List