个人笔记--------- 集合类型的非空验证

验证 list  集合不为空的判断

****

  

/**
     * 判断集合是否为空
     * 
     * @param list
     *            集合
     */
    public static boolean isEmpty(List list) {
        if (list != null && list.size() > 0) {
            return false;
        } else {
            return true;
        }
    }

 

posted on 2018-03-30 14:04  苹果很甜  阅读(128)  评论(0编辑  收藏  举报

导航