Java Is Null isNull(File file)

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

Description

is Null

License

Apache License

Declaration

public static boolean isNull(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 isNull(Object o) {
        return null == o;
    }/*  ww w  .  j av a 2 s.c  om*/

    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. isNotNull(File file)
  2. isNotNullOrEmpty(final Object[] array)
  3. isNull(Object s)
  4. isNull(String sIn)
  5. isNullOrEmpty(Object[] array)