Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.util.Collection;

public class Main {
    /**
     * 
     * @Title: isEmpty
     * @author:  wuwh 
     *
     * <p>check collection is empty</p>
     *
     * <pre>
     * CollectionUtil.isEmpty(null)   = true
     * Map.put("ddd","ddd");
     * CollectionUtil.isEmpty(Map)=false
     * </pre>
     *
     */
    public static boolean isEmpty(Collection collection) {
        return null != collection && !collection.isEmpty() ? false : true;
    }
}