Public Member Functions | Static Public Member Functions

cern.gp.util.NbAssert Class Reference

Inheritance diagram for cern.gp.util.NbAssert:
cern.gp.util.IAssert

List of all members.

Public Member Functions

boolean doAssert (boolean condition, String errMsg)

Static Public Member Functions

static boolean assertTrue (boolean condition, String errMsg)

Detailed Description

A Netbeans oriented implementation of the Assert mechanism. Can be called either directly, using the static NbAssert.assertTrue method or from the principal Assert class

See also:
cern.spsea.util.Assert
Author:
Vito Baggiolini 29-04-02
Version:
0.3 3-May-02

Member Function Documentation

static boolean cern.gp.util.NbAssert.assertTrue ( boolean  condition,
String  errMsg 
) [static]

asserts a condition. Does nothing if the condition is true, shows the error message in a JDialog if the condition is false beware: Unlike the normal cern.spsea.util.Assert#assertTrue(boolean, String) method execution continues after this statement, it does not throw a RuntimeException. If the program cannot continue after an assertion failure, you have to take appropriate measures yourself

Parameters:
condition the condition to be checked
errMsg the message to be displayed if the condition is false
Returns:
the condition
Deprecated:
(use assertTrue() instead)

asserts a condition. Does nothing if the condition is true, shows the error message in a JDialog if the condition is false beware: Unlike the normal cern.spsea.util.Assert#assertTrue(boolean, String) method execution continues after this statement, it does not throw a RuntimeException. If the program cannot continue after an assertion failure, you have to take appropriate measures yourself

Parameters:
condition the condition to be checked
errMsg the message to be displayed if the condition is false
Returns:
the condition

References cern.gp.util.NbAssert.doAssert().

boolean cern.gp.util.NbAssert.doAssert ( boolean  condition,
String  errMsg 
)

implementation of the IAssert interface. Called either from the assertTrue method in this class or from the assertTrue method in the main Assert class. beware: Unlike the normal cern.spsea.util.Assert#assertTrue(boolean, String) method execution continues after this statement, it does not throw a RuntimeException. If the program cannot continue after an assertion failure, you have to take appropriate measures yourself

Parameters:
condition the condition to be checked
errMsg the message to be displayed if the condition is false
Returns:
the condition
See also:
cern.spsea.util.Assert

Implements cern.gp.util.IAssert.

Referenced by cern.gp.util.NbAssert.assertTrue().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties