Java Collection Null isNull(Collection collection)

Here you can find the source of isNull(Collection collection)

Description

is Null

License

Apache License

Declaration

public static boolean isNull(Collection collection) 

Method Source Code


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

import java.util.Collection;
import java.util.Map;

public class Main {
    public static boolean isNull(Object o) {
        return o instanceof String ? isNull((String) o) : o != null;
    }/*from   w  ww .  j a  v a2s  .  c  o m*/

    public static boolean isNull(String s) {
        return s == null || (s = s.trim()).isEmpty() || s.equalsIgnoreCase("null");
    }

    public static boolean isNull(Collection collection) {
        return collection == null || collection.isEmpty();
    }

    public static boolean isNull(Map map) {
        return map == null || map.isEmpty();
    }
}

Related

  1. hasCollectionNullItem(Collection collection)
  2. isAllNull(Collection values)
  3. isEmplyOrNull(Collection collection)
  4. isNotNull(Collection collection)
  5. isNull(Collection collection)
  6. isNull(Collection c)
  7. isNull(Collection collection)
  8. isNull(Collection collection)
  9. isNull(Collection collection)