Class EmptyUtil

  • Direct Known Subclasses:
    U.E

    public class EmptyUtil
    extends java.lang.Object
    一些公用的方法类
    Author:
    WD
    • Constructor Summary

      Constructors 
      Constructor Description
      EmptyUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean isEmpty​(byte[] b)
      判断字节数组是否空 判断 b == null || b.length == 0
      static boolean isEmpty​(int[] objects)
      判断int数组是否空 判断 objects == null || objects.length == 0
      static boolean isEmpty​(java.io.File file)
      判断文件是否空 判断 file == null || file.exists();
      static boolean isEmpty​(java.lang.CharSequence cs)
      返回字符串是否为空 判断cs == null || cs.length() == 0;
      static boolean isEmpty​(java.lang.Object obj)
      判断对象是否空 判断 object == null
      static boolean isEmpty​(java.lang.Object[] objects)
      判断对象数组是否空 判断 objects == null || objects.length == 0
      static boolean isEmpty​(java.lang.String s)
      返回字符串是否为空 判断 s== null || s.length() == 0;
      static boolean isEmpty​(java.util.Collection<?> c)
      返回集合是否为空 判断 c == null || c.size() == 0
      static boolean isEmpty​(java.util.Map<?,​?> m)
      返回Map是否为空 判断 m == null || m.size() == 0
      static boolean isEmptys​(java.lang.Object... objs)
      判断对象是否空 传入的对象有一个为空就返回 false
      static boolean isNotEmpty​(java.lang.Object obj)
      判断对象是否非空 !isEmpty(obj);
      static boolean isNotEmptys​(java.lang.Object... objs)
      判断对象是否非空 !isEmptys(objs...);
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EmptyUtil

        public EmptyUtil()
    • Method Detail

      • isNotEmptys

        public static boolean isNotEmptys​(java.lang.Object... objs)
        判断对象是否非空 !isEmptys(objs...);
        Parameters:
        objs - 对象
        Returns:
        true为空,false非空
      • isEmptys

        public static boolean isEmptys​(java.lang.Object... objs)
        判断对象是否空 传入的对象有一个为空就返回 false
        Parameters:
        objs - 对象
        Returns:
        true为空,false非空
      • isEmpty

        public static boolean isEmpty​(java.lang.Object[] objects)
        判断对象数组是否空 判断 objects == null || objects.length == 0
        Parameters:
        objects - 数组对象
        Returns:
        true为空,false非空
      • isNotEmpty

        public static boolean isNotEmpty​(java.lang.Object obj)
        判断对象是否非空 !isEmpty(obj);
        Parameters:
        obj - 对象
        Returns:
        true为空,false非空
      • isEmpty

        public static boolean isEmpty​(java.lang.Object obj)
        判断对象是否空 判断 object == null
        Parameters:
        obj - 对象
        Returns:
        true为空,false非空
      • isEmpty

        public static boolean isEmpty​(java.io.File file)
        判断文件是否空 判断 file == null || file.exists();
        Parameters:
        file - 对象
        Returns:
        true为空,false非空
      • isEmpty

        public static boolean isEmpty​(byte[] b)
        判断字节数组是否空 判断 b == null || b.length == 0
        Parameters:
        b - 字节数组
        Returns:
        true为空,false非空
      • isEmpty

        public static boolean isEmpty​(java.util.Collection<?> c)
        返回集合是否为空 判断 c == null || c.size() == 0
        Parameters:
        c - 实现Collection接口集合
        Returns:
        true为空,false非空
      • isEmpty

        public static boolean isEmpty​(java.util.Map<?,​?> m)
        返回Map是否为空 判断 m == null || m.size() == 0
        Parameters:
        m - 实现Map接口集合
        Returns:
        true为空,false非空
      • isEmpty

        public static boolean isEmpty​(int[] objects)
        判断int数组是否空 判断 objects == null || objects.length == 0
        Parameters:
        objects - 数组对象
        Returns:
        true为空,false非空
      • isEmpty

        public static boolean isEmpty​(java.lang.String s)
        返回字符串是否为空 判断 s== null || s.length() == 0;
        Parameters:
        s - 字符串
        Returns:
        true为空,false非空
      • isEmpty

        public static boolean isEmpty​(java.lang.CharSequence cs)
        返回字符串是否为空 判断cs == null || cs.length() == 0;
        Parameters:
        cs - CharSequence接口与子对象
        Returns:
        true为空,false非空