@Test public void isEmpty() { String str = null; Assert.isEmpty(str, ErrorCodeDef.SYSTEM_ERROR_10001); System.out.println("str 是null字符串"); str = ""; Assert.isEmpty(str, ErrorCodeDef.SYSTEM_ERROR_10001); System.out.println("str 是空字符串"); List<String> strList = null; Assert.isEmpty(strList, ErrorCodeDef.SYSTEM_ERROR_10001); System.out.println("strList 是null集合"); strList = new ArrayList<>(); Assert.isEmpty(strList, ErrorCodeDef.SYSTEM_ERROR_10001); System.out.println("strList 是空集合"); String[] strs = null; Assert.isEmpty(strs, ErrorCodeDef.SYSTEM_ERROR_10001); System.out.println("strs 是null数组"); strs = new String[0]; Assert.isEmpty(strs, ErrorCodeDef.SYSTEM_ERROR_10001); System.out.println("strs 是空数组"); Map<String, String> strMap = null; Assert.isEmpty(strMap, ErrorCodeDef.SYSTEM_ERROR_10001); System.out.println("strMap 是null Map"); strMap = new HashMap<>(); Assert.isEmpty(strMap, ErrorCodeDef.SYSTEM_ERROR_10001); System.out.println("strMap 是空 Map"); }
public static void isEmpty(final String str, final int errorCode, final Object... params) throws AssertException { if (StringUtils.isNotEmpty(str)) { throw new AssertException(errorCode, params); } }
Assert { public static void isEmpty(final String str, final int errorCode, final Object... params) throws AssertException { if (StringUtils.isNotEmpty(str)) { throw new AssertException(errorCode, params); } } }
Assert { public static void isEmpty(final String str, final int errorCode, final Object... params) throws AssertException { if (StringUtils.isNotEmpty(str)) { throw new AssertException(errorCode, params); } }  }
Assert { public static void isEmpty(final String str, final int errorCode, final Object... params) throws AssertException { if (StringUtils.isNotEmpty(str)) { throw new AssertException(errorCode, params); } }  static void notNull(final Object obj, final int errorCode, final Object... params); static void isNull(final Object obj, final int errorCode, final Object... params); static void notEmpty(final String str, final int errorCode, final Object... params); static void isEmpty(final String str, final int errorCode, final Object... params); static void notEmpty(final T[] str, final int errorCode, final Object... params); static void isEmpty(final T[] str, final int errorCode, final Object... params); static void notEmpty(final Collection<?> str, final int errorCode, final Object... params); static void isEmpty(final Collection<?> str, final int errorCode, final Object... params); static void notEmpty(final Map<?, ?> str, final int errorCode, final Object... params); static void isEmpty(final Map<?, ?> str, final int errorCode, final Object... params); static void equals(final Object obj1, final Object obj2, final int errorCode, final Object... params); static void notEquals(final Object obj1, final Object obj2, final int errorCode, final Object... params); static void isTrue(final boolean result, final int errorCode, final Object... params); static void isFalse(final boolean result, final int errorCode, final Object... params); }
Assert { public static void isEmpty(final String str, final int errorCode, final Object... params) throws AssertException { if (StringUtils.isNotEmpty(str)) { throw new AssertException(errorCode, params); } }  static void notNull(final Object obj, final int errorCode, final Object... params); static void isNull(final Object obj, final int errorCode, final Object... params); static void notEmpty(final String str, final int errorCode, final Object... params); static void isEmpty(final String str, final int errorCode, final Object... params); static void notEmpty(final T[] str, final int errorCode, final Object... params); static void isEmpty(final T[] str, final int errorCode, final Object... params); static void notEmpty(final Collection<?> str, final int errorCode, final Object... params); static void isEmpty(final Collection<?> str, final int errorCode, final Object... params); static void notEmpty(final Map<?, ?> str, final int errorCode, final Object... params); static void isEmpty(final Map<?, ?> str, final int errorCode, final Object... params); static void equals(final Object obj1, final Object obj2, final int errorCode, final Object... params); static void notEquals(final Object obj1, final Object obj2, final int errorCode, final Object... params); static void isTrue(final boolean result, final int errorCode, final Object... params); static void isFalse(final boolean result, final int errorCode, final Object... params);  }