at.spardat.xma.util
Class Assert

java.lang.Object
  extended byat.spardat.xma.util.Assert

public class Assert
extends java.lang.Object

To enable assertions as long as 1.4 is not in production.

Usage is as follows:

 if (Assert.ON) Assert.check (condition);
 


Field Summary
static boolean ON
          change this if assertions should be checked warning: this is changed in the build.xml
 
Method Summary
static void check(boolean condition)
          Throws a runtime exception if condition is not true
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ON

public static final boolean ON
change this if assertions should be checked warning: this is changed in the build.xml

See Also:
Constant Field Values
Method Detail

check

public static void check(boolean condition)
Throws a runtime exception if condition is not true

Parameters:
condition - the condition to check