All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.silentgo.utils.convertor.StringToIntegerConvertor Maven / Gradle / Ivy

There is a newer version: 0.1.16
Show newest version
package com.silentgo.utils.convertor;


import com.silentgo.utils.inter.ITypeConvertor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Project : silentgo
 * com.silentgo.kit.typeconvert.support
 *
 * @author teddyzhu
 *         

* Created by teddyzhu on 16/7/26. */ public class StringToIntegerConvertor implements ITypeConvertor { private Logger LOGGER = LoggerFactory.getLogger(StringToIntegerConvertor.class); @Override public Integer convert(String source) { Integer target = null; try { target = Integer.valueOf(source); } catch (NumberFormatException e) { e.printStackTrace(); LOGGER.error(e.getMessage()); } return target; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy