Java1 ObjectUtils.isEmpty ObjectUtils public static boolean isEmpty(@Nullable Object obj) { if (obj == null) { return true; } else if (obj instanceof Optional) { return !((Optional)obj).isPresent(); } else if (obj instanceof CharSequence) { return ((CharSequence)obj).length() == 0; } else if (obj.getClass().isArray()) { return Array.getLength(obj) == 0; } else if (obj instanceof Collection) { return ((Collection)obj).isE.. 2022. 3. 27. 이전 1 다음