Here you can find the source of nullOrEmpty(final Collection
public static <E> boolean nullOrEmpty(final Collection<E> in)
//package com.java2s; //License from project: Apache License import java.util.Collection; import java.util.Map; public class Main { public static boolean nullOrEmpty(String in) { if ((in == null) || (in.isEmpty())) { return true; }//from w w w . j av a 2 s .c om return false; } public static <E> boolean nullOrEmpty(final Collection<E> in) { if ((in == null) || (in.isEmpty())) { return true; } return false; } public static <E, V> boolean nullOrEmpty(final Map<E, V> in) { if ((in == null) || (in.isEmpty())) { return true; } return false; } public static <T> boolean nullOrEmpty(T[] in) { if ((in == null) || (in.length == 0)) { return true; } return false; } public static boolean nullOrEmpty(byte[] in) { if ((in == null) || (in.length == 0)) { return true; } return false; } public static boolean nullOrEmpty(short[] in) { if ((in == null) || (in.length == 0)) { return true; } return false; } public static boolean nullOrEmpty(int[] in) { if ((in == null) || (in.length == 0)) { return true; } return false; } public static boolean nullOrEmpty(long[] in) { if ((in == null) || (in.length == 0)) { return true; } return false; } public static boolean nullOrEmpty(float[] in) { if ((in == null) || (in.length == 0)) { return true; } return false; } public static boolean nullOrEmpty(double[] in) { if ((in == null) || (in.length == 0)) { return true; } return false; } public static boolean nullOrEmpty(boolean[] in) { if ((in == null) || (in.length == 0)) { return true; } return false; } public static boolean nullOrEmpty(char[] in) { if ((in == null) || (in.length == 0)) { return true; } return false; } }