org.xins.logdoc
Class MandatoryArgumentChecker

java.lang.Object
  extended byorg.xins.logdoc.MandatoryArgumentChecker

public final class MandatoryArgumentChecker
extends Object

Utility class used to check mandatory method arguments.

Since:
XINS 1.0.0
Version:
$Revision: 1.12 $ $Date: 2006/08/28 09:12:30 $
Author:
Ernst de Haan

Method Summary
static void check(String argumentName, Object argumentValue)
          Checks that the specified argument is not null.
static void check(String argumentName1, Object argumentValue1, String argumentName2, Object argumentValue2)
          Checks that the specified two arguments are not null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

check

public static void check(String argumentName,
                         Object argumentValue)
                  throws IllegalArgumentException
Checks that the specified argument is not null.

Parameters:
argumentName - the name of the argument that cannot be null.
argumentValue - the value of the argument that cannot be null.
Throws:
IllegalArgumentException - if argumentName == null or argumentValue == null.

check

public static void check(String argumentName1,
                         Object argumentValue1,
                         String argumentName2,
                         Object argumentValue2)
                  throws IllegalArgumentException
Checks that the specified two arguments are not null.

Parameters:
argumentName1 - the name of the first argument that cannot be null.
argumentValue1 - the value of the first argument that cannot be null.
argumentName2 - the name of the second argument that cannot be null.
argumentValue2 - the value of the second argument that cannot be null.
Throws:
IllegalArgumentException - if argumentName1 == null || argumentName2 == null or if argumentValue1 == null || argumentValue2 == null.


See http://www.xins.org/.