org.jrdf.util.param
Class ParameterUtil

java.lang.Object
  extended byorg.jrdf.util.param.ParameterUtil

public final class ParameterUtil
extends Object

Utility for checking parameters to methods.

Version:
$Revision: 1.1 $
Author:
Tom Adams

Method Summary
static void checkNotEmptyString(String name, String param)
          Checks if param is null or the empty string and throws an exception if it is.
static void checkNotNull(String name, Object param)
          Checks if param is null and throws an exception if it is.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

checkNotNull

public static void checkNotNull(String name,
                                Object param)
                         throws IllegalArgumentException
Checks if param is null and throws an exception if it is.

Parameters:
name - The name of the parameter to check.
param - The parameter to check.
Throws:
IllegalArgumentException - If param is null.

checkNotEmptyString

public static void checkNotEmptyString(String name,
                                       String param)
                                throws IllegalArgumentException
Checks if param is null or the empty string and throws an exception if it is.

Parameters:
name - The name of the parameter to check.
param - The parameter to check.
Throws:
IllegalArgumentException - If param is null or the empty string.