Here you can find the source of isEmpty(Collection
public static <T> Collection<T> isEmpty(Collection<T> collection, String messgae)
//package com.java2s; import java.util.Collection; public class Main { public static <T> Collection<T> isEmpty(Collection<T> collection, String messgae) { if (collection == null || collection.isEmpty()) { //TODO: Araz throw new IllegalArgumentException(messgae); }/*from ww w. jav a2s . c o m*/ return collection; } }