calypso.util
Class Assert

java.lang.Object
  |
  +--calypso.util.Assert

public final class Assert
extends java.lang.Object

Simple assertion class that throws exceptions when an assertion fails.


Constructor Summary
Assert()
           
 
Method Summary
static void Assertion(boolean aCondition)
          Throw an exception if aCondition is false.
static void Assertion(boolean aCondition, java.lang.String aMessage)
          Throw an exception if aCondition is false.
static void NotReached(java.lang.String msg)
          Throw an exception always.
static void NotYetImplemented(java.lang.String msg)
          Throw an exception always.
static void PostCondition(boolean aCondition)
          Throw an exception if aCondition is false.
static void PostCondition(boolean aCondition, java.lang.String aMessage)
          Throw an exception if aCondition is false.
static void PreCondition(boolean aCondition)
          Throw an exception if aCondition is false.
static void PreCondition(boolean aCondition, java.lang.String aMessage)
          Throw an exception if aCondition is false.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Assert

public Assert()
Method Detail

Assertion

public static final void Assertion(boolean aCondition)
Throw an exception if aCondition is false.

Assertion

public static final void Assertion(boolean aCondition,
                                   java.lang.String aMessage)
Throw an exception if aCondition is false.

NotReached

public static final void NotReached(java.lang.String msg)
Throw an exception always. Used when the caller runs across some code that should never be reached.

NotYetImplemented

public static final void NotYetImplemented(java.lang.String msg)
Throw an exception always. Used when the caller runs across some unimplemented functionality in pre-release code.

PreCondition

public static final void PreCondition(boolean aCondition)
Throw an exception if aCondition is false.

PreCondition

public static final void PreCondition(boolean aCondition,
                                      java.lang.String aMessage)
Throw an exception if aCondition is false.

PostCondition

public static final void PostCondition(boolean aCondition)
Throw an exception if aCondition is false.

PostCondition

public static final void PostCondition(boolean aCondition,
                                       java.lang.String aMessage)
Throw an exception if aCondition is false.