link.jfire.mvc.binder.impl.WBooleanBinder Maven / Gradle / Ivy
package link.jfire.mvc.binder.impl;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import link.jfire.baseutil.StringUtil;
import link.jfire.mvc.binder.AbstractDataBinder;
public class WBooleanBinder extends AbstractDataBinder
{
public WBooleanBinder(String paramName)
{
super(paramName);
}
@Override
public Object binder(HttpServletRequest request, Map map, HttpServletResponse response)
{
String value = map.get(paramName);
if (StringUtil.isNotBlank(value))
{
return Boolean.valueOf(value);
}
return null;
}
}