Java Is Null isNotNull(File file)

Here you can find the source of isNotNull(File file)

Description

is Not Null

License

Apache License

Declaration

public static boolean isNotNull(File file) 

Method Source Code


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

import java.io.*;

import java.util.List;
import java.util.Map;
import java.util.Set;

public class Main {
    public static boolean isNotNull(Object o) {
        return !isNull((Object) o);
    }/*w  w w .  ja  va 2 s .  com*/

    public static boolean isNotNull(List<?> list) {
        return !isNull((List) list);
    }

    public static boolean isNotNull(Set<?> set) {
        return !isNull((Set) set);
    }

    public static boolean isNotNull(Map<?, ?> map) {
        return !isNull((Map) map);
    }

    public static boolean isNotNull(Long lg) {
        return !isNull((Long) lg);
    }

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

    public static boolean isNotNull(File file) {
        return !isNull((File) file);
    }

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

    public static boolean isNull(Object o) {
        return null == o;
    }

    public static boolean isNull(List<?> list) {
        return null == list || list.size() == 0;
    }

    public static boolean isNull(Set<?> set) {
        return null == set || set.size() == 0;
    }

    public static boolean isNull(Map<?, ?> map) {
        return null == map || map.size() == 0;
    }

    public static boolean isNull(Long lg) {
        return null == lg || lg.longValue() == 0L;
    }

    public static boolean isNull(Integer it) {
        return null == it || it.intValue() == 0;
    }

    public static boolean isNull(File file) {
        return null == file || !file.exists();
    }

    public static boolean isNull(Object[] strs) {
        return null == strs || strs.length == 0;
    }
}

Related

  1. isNotNullOrEmpty(final Object[] array)
  2. isNull(File file)
  3. isNull(Object s)
  4. isNull(String sIn)