fr.vergne.pester.util.argscheck.ArgsCheck Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pester-core Show documentation
Show all versions of pester-core Show documentation
Implementation of the Pester library.
The newest version!
package fr.vergne.pester.util.argscheck;
public interface ArgsCheck {
public static T requireNonNull(T arg, String message) {
if (arg == null) {
throw new IllegalArgumentException(message);
} else {
return arg;
}
}
public static String requireNonNullNorEmpty(String arg, String message) {
if (arg == null || arg.isEmpty()) {
throw new IllegalArgumentException(message);
} else {
return arg;
}
}
}