Here you can find the source of isEmpty(List
Parameter | Description |
---|---|
objList | a parameter |
public static <T> boolean isEmpty(List<T> objList)
//package com.java2s; /*/* ww w.j av a2s. c om*/ * Copyright (c) 2012 CitrusPay. All Rights Reserved. * * This software is the proprietary information of CitrusPay. * Use is subject to license terms. */ import java.util.List; public class Main { /** * This function checks if the string is null or empty. returns true if string is not null but empty. * @param str * @return */ public static boolean isEmpty(String str) { if (str == null || str.length() <= 0) { return true; } return false; } /** * This function checks if the list of the objects is empty * @param objList * @return */ public static <T> boolean isEmpty(List<T> objList) { return (isNull(objList) || (objList.size() == 0)); } /** * This function checks if object is null * @param object * @return */ public static boolean isNull(Object object) { return (object == null) ? Boolean.TRUE : Boolean.FALSE; } }