package com.securitycontrol.common.core.utils.aes;


import java.util.List;

/**
 * @author HeiZi
 */
public class ListHelper {

    public static <T> boolean isNotEmpty(List<T> list){
        if(list!=null &&list.size()>0){
            return true;
        }
        return false;
    }
    public static <T> boolean isEmpty(List<T> list){

        return !isNotEmpty(list);
    }

    /**
     * 集合转字符串
     * @param list
     * @param join
     * @return
     */
    public static String joinList(List<String> list,String join){
        String strs=null;
        for (String st:list) {
            if(strs==null){
                strs=st;
            }else{
                strs=strs+join+st;
            }
        }
        return strs;
    }

}
