All Downloads are FREE. Search and download functionalities are using the official Maven repository.

fr.vergne.pester.util.argscheck.ArgsCheck Maven / Gradle / Ivy

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;
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy