Java Collection Null isNotNull(Collection collection)

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

Description

is Not Null

License

Open Source License

Declaration

public final static boolean isNotNull(Collection collection) 

Method Source Code


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

public class Main {
    public final static boolean isNotNull(Long longs) {
        return !isNull(longs);
    }//from ww  w  .  j a  v  a  2  s .com

    public final static boolean isNotNull(String str) {
        return !isNull(str);
    }

    public final static boolean isNotNull(Collection collection) {
        return !isNull(collection);
    }

    public final static boolean isNotNull(Map map) {
        return !isNull(map);
    }

    public final static boolean isNotNull(Integer integer) {
        return !isNull(integer);
    }

    public final static boolean isNotNull(Object[] objs) {
        return !isNull(objs);
    }

    public final static boolean isNull(Object[] objs) {
        if (objs == null || objs.length == 0) {
            return true;
        }
        return false;
    }

    public final static boolean isNull(Integer integer) {
        if (integer == null || integer == 0) {
            return true;
        }
        return false;
    }

    public final static boolean isNull(Collection collection) {
        if (collection == null || collection.size() == 0) {
            return true;
        }
        return false;
    }

    public final static boolean isNull(Map map) {
        if (map == null || map.size() == 0) {
            return true;
        }
        return false;
    }

    public final static boolean isNull(String str) {
        return str == null || "".equals(str.trim()) || "null".equals(str.toLowerCase());
    }

    public final static boolean isNull(Long longs) {
        if (longs == null || longs == 0) {
            return true;
        }
        return false;
    }
}

Related

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