Java Collection Empty isEmpty(Collection data)

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

Description

is Empty

License

Open Source License

Declaration

public static <E> boolean isEmpty(Collection<E> data) 

Method Source Code

//package com.java2s;

import java.util.Collection;

public class Main {

    public static boolean isEmpty(Object data) {
        return (null == data || "".equals(data.toString().trim()));
    }//from w  w  w . ja v  a 2  s.  c  o  m

    public static <E> boolean isEmpty(Collection<E> data) {
        return (null == data || 0 == data.size());
    }
}

Related

  1. isEmpty(Collection o)
  2. isEmpty(Collection objs)
  3. isEmpty(Collection value)
  4. isEmpty(Collection values)
  5. isEmpty(Collection c)
  6. isEmpty(Collection objectCollection)
  7. isEmpty(Collection c)
  8. isEmpty(Collection c)
  9. isEmpty(Collection collection)

  10. HOME | Copyright © www.java2s.com 2016