Java List Null Empty isNotEmpty(List objList)

Here you can find the source of isNotEmpty(List objList)

Description

This function checks if the list of the objects is empty or not

License

Open Source License

Parameter

Parameter Description
objList a parameter

Declaration

public static <T> boolean isNotEmpty(List<T> objList) 

Method Source Code

//package com.java2s;
/*/*from w w w.ja  v  a2s .c o m*/
 * 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 list of the objects is empty or not
     * @param objList
     * @return
     */
    public static <T> boolean isNotEmpty(List<T> objList) {
        return (isNotNull(objList) && (objList.size() > 0));
    }

    /**
     * This function checks if object is not null
     * @param object
     * @return
     */
    public static boolean isNotNull(Object object) {
        return (object != null) ? Boolean.TRUE : Boolean.FALSE;
    }
}

Related

  1. isNotEmpty(List list)
  2. isNotEmpty(List value)
  3. isNotEmpty(List list)
  4. isNotEmpty(List list)
  5. isNotEmpty(List list)
  6. isNotNullAndEmpty(List list)
  7. isNotNullAndNotEmpty(List list)
  8. isNull(List list)
  9. isNullish(java.util.List value)