package com.dxhy.erp.utils;

import org.apache.commons.lang.StringUtils;

/**
 * @author dxhy
 */
public class ObjectUtil {

    public static String fixNull(Object obj) {
        String result = "";
        if (obj != null) {
            result = obj.toString();
        }
        return result;
    }

    public static boolean checkData(Object... objs) {
        boolean flag = true;
        if (objs != null && objs.length > 0) {
            for (Object o : objs) {
                if (StringUtils.isBlank(fixNull(o))) {
                    flag = false;
                    break;
                }
            }
        }
        return flag;
    }

    public static boolean isExistLowwer(String str) {
        boolean flag = false;
        for (char c : str.toCharArray()) {
            if (Character.isLowerCase(c)) {
                flag = true;
            }
        }

        return flag;
    }

}
