IDebug
© 1997-2001 Joseph Kiniry
© 2000-2001 KindSoftware
© 1997-1999 Caltech
All Rights Reserved

idebug
Class Assert

java.lang.Object
  |
  +--idebug.Assert
All Implemented Interfaces:
java.lang.Cloneable

public class Assert
extends java.lang.Object
implements java.lang.Cloneable

The core interface to making assertions.

Version:
$Revision: 2146 $ $Date: 2005-02-13 16:54:27 +0000 (Sun, 13 Feb 2005) $
Author:
Joseph R. Kiniry
See Also:
Debug, Context

Method Summary
static void assert(boolean assertion)
           Assert that the passed boolean expression evaluates to true.
 void assert(boolean assertion, java.lang.String assertionString)
           Assert that the passed boolean expression evaluates to true.
 void assert(boolean assertion, java.lang.String assertionString, java.lang.Object message)
           Assert that the passed boolean expression evaluates to true.
 java.lang.Object clone()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

assert

public static void assert(boolean assertion)

Assert that the passed boolean expression evaluates to true. If it does not, the assertion fails, a stack dump takes place via the current debugging output channel, and a FailedAssertionException is thrown.

Parameters:
assertion - is the boolean expression to assert.

assert

public void assert(boolean assertion,
                   java.lang.String assertionString)

Assert that the passed boolean expression evaluates to true. If it does not, the assertion fails, a stack dump takes place, and a FailedAssertionException is thrown.

Parameters:
assertion - is the boolean expression to assert.
assertionString - is the text of the assertion itself.

assert

public void assert(boolean assertion,
                   java.lang.String assertionString,
                   java.lang.Object message)

Assert that the passed boolean expression evaluates to true. If it does not, the assertion fails, the message is displayed, a stack dump takes place, and a FailedAssertionException is thrown.

Parameters:
assertion - is the boolean expression to assert.
assertionString - is the text of the assertion itself.
message - the debugging message to print if the assertion fails. The method toString() is called on the message object.

IDebug
© 1997-2001 Joseph Kiniry
© 2000-2001 KindSoftware
© 1997-1999 Caltech
All Rights Reserved