Java Collection Empty isEmpty(Collection col)

Here you can find the source of isEmpty(Collection col)

Description

Returns true if collection is null or empty

License

LGPL

Parameter

Parameter Description
col a parameter

Declaration

public static boolean isEmpty(Collection col) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

import java.util.Collection;

public class Main {
    /**/* ww  w. j a  v  a2  s  .c om*/
     * Returns true if collection is null or empty
     * @param col
     * @return 
     */
    public static boolean isEmpty(Collection col) {
        if (col == null)
            return true;

        return col.isEmpty();

    }
}

Related

  1. isEmpty(Collection c)
  2. isEmpty(Collection c)
  3. isEmpty(Collection c)
  4. isEmpty(Collection c)
  5. isEmpty(Collection c)
  6. isEmpty(Collection collection)
  7. isEmpty(Collection collection)
  8. isEmpty(Collection collection)
  9. isEmpty(Collection collection)