@@ -0,0 +1,1044 @@
+/*%0A * @Checker.java 1.0 Nov 21, 2013 Sistema Integral de Gestion Hospitalaria%0A */%0Apackage py.una.med.base.util;%0A%0A/**%0A * %0A * @author Arturo Volpe%0A * @since 2.2.8%0A * @version 1.0 Nov 21, 2013%0A * %0A */%0Apublic class Checker %7B%0A%0A%09/**%0A%09 * Chequea si un par%C3%A1metro es nulo.%0A%09 * %0A%09 * %3Cp%3E%0A%09 * Si el par%C3%A1metro es nulo, entonces lanza una excepci%C3%B3n del tipo%0A%09 * %3C/p%3E%0A%09 * %0A%09 * @param object%0A%09 */%0A%09public static %3CT%3E T notNull(T object) %7B%0A%0A%09%09return notNull(object, %22Object not null is not allowed%22);%0A%09%7D%0A%0A%09public static %3CT%3E T notNull(T object, String message, Object ... arguments) %7B%0A%0A%09%09if (object == null) %7B%0A%09%09%09throw new IllegalArgumentException(format(message, arguments));%0A%09%09%7D%0A%09%09return object;%0A%09%7D%0A%0A%09public static %3CT extends CharSequence%3E T notValid(T string, String message,%0A%09%09%09Object ... arguments) %7B%0A%0A%09%09if ((string == null) %7C%7C StringUtils.isInvalid(string.toString())) %7B%0A%09%09%09throw new IllegalArgumentException(format(message, arguments));%0A%09%09%7D%0A%09%09return string;%0A%09%7D%0A%0A%09private static String format(String message, Object ... arguments) %7B%0A%0A%09%09return message;%0A%09%7D%0A%7D%0A

Checker de parametros