Java Collection Empty isEmpty(Collection c)

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

Description

Check whether collection c is empty.

License

Open Source License

Declaration

public static boolean isEmpty(Collection c) 

Method Source Code


//package com.java2s;

import java.util.Collection;

public class Main {
    /** Check whether string s is empty. */
    public static boolean isEmpty(String s) {
        return ((s == null) || (s.length() == 0));
    }//from   www.j  a v  a2 s. com

    /** Check whether collection c is empty. */
    public static boolean isEmpty(Collection c) {
        return ((c == null) || (c.size() == 0));
    }
}

Related

  1. isCollectionEmpty(Collection value)
  2. isCollectionNotEmpty(Collection collection)
  3. isCollectionNullOrEmpty(Collection collection)
  4. isEmpty(Collection c)
  5. isEmpty(Collection c)
  6. isEmpty(Collection c)
  7. isEmpty(Collection c)
  8. isEmpty(Collection col)
  9. isEmpty(Collection collection)