i3.dragos.util
Class QA

java.lang.Object
  extended by i3.dragos.util.QA

public final class QA
extends java.lang.Object

QA methods for checking parameter validity. An IllegalArgumentException is thrown for all parameters which do not obey the rules.

Author:
Thorsten Hermes <thermes@i3.informatik.rwth-aachen.de>

Method Summary
static void checkInstanceOfParam(java.lang.Object param, java.lang.String name, java.lang.Class clazz)
          Checks that a parameter is not null, and instance of a specified class.
static void checkNonNullParam(java.lang.Object param, java.lang.String name)
          Checks that a parameter is not null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

checkNonNullParam

public static void checkNonNullParam(java.lang.Object param,
                                     java.lang.String name)
Checks that a parameter is not null. If the parameter is null an IllegalArgumentException is thrown.

Parameters:
param - The parameter to check.
name - The name of the paremeter (must not be null).

checkInstanceOfParam

public static void checkInstanceOfParam(java.lang.Object param,
                                        java.lang.String name,
                                        java.lang.Class clazz)
Checks that a parameter is not null, and instance of a specified class. If any parameter is null or 'param' is not an instance of the specificed class an IllegalArgumentException is thrown.

Parameters:
param - The parameter to check.
name - The name of the paremeter (must not be null).
clazz - The requested class of the paremeter (must not be null).


Copyright © 2002-2008 RWTH Aachen, Department of Computer Science 3 (Software Engineering). All Rights Reserved.