monitor
Class Assertion

java.lang.Object
  extended by monitor.Assertion
Direct Known Subclasses:
True_Assertion

public abstract class Assertion
extends java.lang.Object

Assertions that may be checked from time to time.

Version:
2.0
Author:
Theodore S. Norvell

Field Summary
protected  java.lang.String message
           
 
Constructor Summary
Assertion()
           
 
Method Summary
 void check()
          Throw an AssertionError if the assertion is not true.
static void check(boolean b)
          Throw an AssertionError if the parameter is not true.
static void check(boolean b, java.lang.String message)
          Throw an AssertionError if the boolean parameter is not true.
abstract  boolean isTrue()
          This method says whether the assertion is true.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

message

protected java.lang.String message
Constructor Detail

Assertion

public Assertion()
Method Detail

isTrue

public abstract boolean isTrue()
This method says whether the assertion is true.


check

public void check()
Throw an AssertionError if the assertion is not true.


check

public static void check(boolean b)
Throw an AssertionError if the parameter is not true.


check

public static void check(boolean b,
                         java.lang.String message)
Throw an AssertionError if the boolean parameter is not true.