Here you can find the source of isNullOrEmpty(Collection> obj)
Parameter | Description |
---|---|
obj | the obj |
public static boolean isNullOrEmpty(Collection<?> obj)
//package com.java2s; //License from project: Open Source License import java.util.Collection; import java.util.Map; public class Main { /**/*w w w .j a v a 2s . co m*/ * Checks if is null or empty. * * @param value * the value * @return true, if is null or empty */ public static boolean isNullOrEmpty(String value) { return (value == null || value.length() <= 0); } /** * Checks if is null or empty. * * @param obj * the obj * @return true, if is null or empty */ public static boolean isNullOrEmpty(Collection<?> obj) { return (obj == null || obj.isEmpty()); } /** * Checks if is null or empty. * * @param map * the map * @return true, if is null or empty */ public static boolean isNullOrEmpty(Map<?, ?> map) { return (map == null || map.isEmpty()); } }