@@ -0,0 +1,1837 @@
+/*%0D%0A * Image/J Plugins%0D%0A * Copyright (C) 2002-2009 Jarek Sacha%0D%0A * Author's email: jsacha at users dot sourceforge dot net%0D%0A *%0D%0A * This library is free software; you can redistribute it and/or%0D%0A * modify it under the terms of the GNU Lesser General Public%0D%0A * License as published by the Free Software Foundation; either%0D%0A * version 2.1 of the License, or (at your option) any later version.%0D%0A *%0D%0A * This library is distributed in the hope that it will be useful,%0D%0A * but WITHOUT ANY WARRANTY; without even the implied warranty of%0D%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU%0D%0A * Lesser General Public License for more details.%0D%0A *%0D%0A * You should have received a copy of the GNU Lesser General Public%0D%0A * License along with this library; if not, write to the Free Software%0D%0A * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA%0D%0A *%0D%0A * Latest release available at http://sourceforge.net/projects/ij-plugins/%0D%0A */%0D%0A%0D%0Apackage net.sf.ij_plugins.util;%0D%0A%0D%0A/**%0D%0A * @author Jarek Sacha%0D%0A * @since Oct 22, 2009 7:34:52 PM%0D%0A */%0D%0Apublic final class Validate %7B%0D%0A%0D%0A    private Validate() %7B%0D%0A    %7D%0D%0A%0D%0A    /**%0D%0A     * Checks if the object is not %7B@code null%7D. If it is %7B@code null%7D throws %7B@link IllegalArgumentException%7D.%0D%0A     *%0D%0A     * @param object argument to be validated.%0D%0A     * @param name   argument name, used in exception message.%0D%0A     * @throws IllegalArgumentException if %7B@code object%7D is null.%0D%0A     */%0D%0A    public static void argumentNotNull(final Object object, final String name) throws IllegalArgumentException %7B%0D%0A        if (object == null) %7B%0D%0A            throw new IllegalArgumentException(%0D%0A                    name != null%0D%0A                            ? %22Argument '%22 + name + %22' cannot be null.%22%0D%0A                            : %22Argument cannot be null.%22);%0D%0A        %7D%0D%0A    %7D%0D%0A%7D%0D%0A

Add validation ultility.