Android Map Empty Check isEmptyMap(Map map)

Here you can find the source of isEmptyMap(Map map)

Description

is Empty Map

Declaration

public static boolean isEmptyMap(Map<?, ?> map) 

Method Source Code

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

public class Main {
    public static boolean isEmptyMap(Map<?, ?> map) {
        return map == null || isEmpty(map.keySet());
    }//from ww  w.j  a  va2  s  . c o m

    public static boolean isEmpty(Collection<?> collection) {
        return collection == null || collection.isEmpty();
    }
}

Related

  1. isEmpty(Map map)