Java Collection Empty isEmpty(Collection c)

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

Description

Checks if collection is empty.

License

Open Source License

Parameter

Parameter Description
c a parameter

Return

true if collection is empty

Declaration

public static final boolean isEmpty(Collection<?> c) 

Method Source Code


//package com.java2s;
import java.util.Collection;

public class Main {
    /**//from  w  w  w  . ja  v  a2  s . c o m
     * Checks if collection is empty. Null references are considered to be empty collections.
     * @param c
     * @return true if collection is empty
     */
    public static final boolean isEmpty(Collection<?> c) {
        return c == null || c.isEmpty();
    }
}

Related

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