package com.diagbot.util;

/**
 * @Description: Integer 工具类
 * @author: gaodm
 * @time: 2018/9/4 9:24
 */
public class IntegerUtil {
    /**
     * 当无法转换时返回0
     * @param s
     * @return
     */
    public static Integer parseIntNullZero(String s) {
        Integer val;
        try {
            val = Integer.parseInt(s);
        } catch (Exception e) {
            val = 0;
        }
        return val;
    }
}
