add allEmpty

This commit is contained in:
Timi
2026-08-05 23:07:28 +08:00
parent e2bba01daf
commit 99fb2f62f2
@@ -81,6 +81,15 @@ public interface TimiJava {
return false; return false;
} }
static boolean allEmpty(Object... objects) {
for (Object object : objects) {
if (isNotEmpty(object)) {
return false;
}
}
return true;
}
static boolean allNotEmpty(Object... objects) { static boolean allNotEmpty(Object... objects) {
for (Object object : objects) { for (Object object : objects) {
if (isEmpty(object)) { if (isEmpty(object)) {