Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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

public class Main {
    /**
     *
     * @param map
     * @return
     */
    public static boolean isEmpty(Map map) {
        if (null == map) {
            return true;
        } else if (map.isEmpty()) {
            return true;
        }
        return false;
    }

    /**
     *
     * @param collection
     * @return
     */
    public static boolean isEmpty(Collection collection) {
        if (null == collection) {
            return true;
        } else if (collection.isEmpty()) {
            return true;
        }
        return false;
    }
}