
com.podio.item.map.converter.ProgressConverter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of api Show documentation
Show all versions of api Show documentation
The official Java wrapper for the Podio API
package com.podio.item.map.converter;
import java.util.Collections;
import java.util.Map;
import org.apache.commons.beanutils.ConvertUtils;
public class ProgressConverter implements FieldConverter {
@Override
public Map fromModel(Object value) {
Integer integerValue = (Integer) ConvertUtils.convert(value,
Integer.class);
return Collections.singletonMap("value", integerValue);
}
@Override
public Object toModel(Map map, Class modelClass) {
Integer value = (Integer) map.get("value");
return ConvertUtils.convert(value, modelClass);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy