All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.fengwenyi.javalib.collection.MapUtils Maven / Gradle / Ivy

There is a newer version: 3.0.1
Show newest version
package com.fengwenyi.javalib.collection;

import java.util.Map;

/**
 * Map工具类
 * 
    *
  • 判断Map是否为空
  • *
  • 判断Map是否不为空
  • *
* @author Wenyi Feng * @since 2018-11-17 */ public class MapUtils { /** * 判断Map是否为空 * @param map 待判断的Map * @return 是否为空,true:空;false:不为空 */ public static boolean isEmpty(Map map) { if (map == null) return true; return map.isEmpty(); } /** * 判断Map是否不为空 * @param map 待判断的Map * @return 是否不为空,true:不为空;false:空 */ public static boolean isNotEmpty(Map map) { return !isEmpty(map); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy