
org.flips.utils.ValidationUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of flips-core Show documentation
Show all versions of flips-core Show documentation
Flips Core framework, provides all the flip annotations, conditions and different advices
package org.flips.utils;
public final class ValidationUtils {
private ValidationUtils() {
throw new AssertionError("No ValidationUtils instances for you!");
}
public static final String requireNonEmpty(String str, String message) {
boolean isEmpty = Utils.isEmpty(str);
if ( isEmpty )
throw new IllegalArgumentException(message);
return str;
}
public static final T[] requireNonEmpty(T[] t, String message) {
if ( Utils.isEmpty(t) )
throw new IllegalArgumentException(message);
return t;
}
public static final Object requireNonNull(Object o, String message) {
if ( o == null )
throw new IllegalArgumentException(message);
return o;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy