Class Assertion

java.lang.Object
  |
  +--Assertion

public class Assertion
extends java.lang.Object

Assertion.assert(test,message) checks to see if test succeeds.
If test fails, assert() emits message, and halts the program.
Written by Edwin Kay, 11 June 2001.


Constructor Summary
Assertion()
           
 
Method Summary
static void assert(boolean test, java.lang.String message)
          If test fails, assert() emits message, and halts the program.
An example from class Input:
Assertion.assert(ch>='0' && ch<='9',"Digit expected but '"+ch+"' found");
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Assertion

public Assertion()
Method Detail

assert

public static void assert(boolean test,
                          java.lang.String message)
If test fails, assert() emits message, and halts the program.
An example from class Input:
Assertion.assert(ch>='0' && ch<='9',"Digit expected but '"+ch+"' found");