nz.ac.waikato.jdsl.core.ref
Class Assertion

java.lang.Object
  extended by nz.ac.waikato.jdsl.core.ref.Assertion

Deprecated. Starting with Java 2 version 1.4 assertions are part of the language, and thus this class is no longer necessary.

public final class Assertion
extends java.lang.Object

Helps to check invariant conditions in program and check correctness of implementation. Warning: not thread safe. Undefined behavior if several threads fail on assertion checks simultaneously.

Version:
JDSL 2.1.1
Author:
Benety Goh (bg@cs.brown.edu)

Method Summary
static void check(boolean mustBeTrue)
          Deprecated. Never use this method to indicate bad user input; this method is for asserting internal correctness of the implementation only.
static void check(boolean mustBeTrue, java.lang.String message)
          Deprecated. Never use this method to indicate bad user input; this method is for asserting internal correctness of the implementation only.
 
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(boolean mustBeTrue)
                  throws AssertionException
Deprecated. 
Never use this method to indicate bad user input; this method is for asserting internal correctness of the implementation only.

Parameters:
mustBeTrue - expression that is assumed to be true
Throws:
AssertionException - If mustBeTrue is false

check

public static void check(boolean mustBeTrue,
                         java.lang.String message)
                  throws AssertionException
Deprecated. 
Never use this method to indicate bad user input; this method is for asserting internal correctness of the implementation only.

Parameters:
mustBeTrue - expression that is assumed to be true
message - description of the problem
Throws:
AssertionException - If mustBeTrue is false


Copyright © 2009 ModelJUnit Project. All Rights Reserved.