org.apache.lenya.util
Class Assert

java.lang.Object
  extended by org.apache.lenya.util.Assert

public final class Assert
extends java.lang.Object

Assertion utility.


Constructor Summary
Assert()
           
 
Method Summary
static void isTrue(java.lang.String expression, boolean value)
           
static void notNull(java.lang.Object object)
           
static void notNull(java.lang.String parameterName, java.lang.Object object)
           
 
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

notNull

public static final void notNull(java.lang.String parameterName,
                                 java.lang.Object object)
Parameters:
parameterName - The parameter name to use in the exception.
object - The object.
Throws:
java.lang.RuntimeException - if the object is null.

notNull

public static final void notNull(java.lang.Object object)
Parameters:
parameterName - The parameter name to use in the exception.
object - The object.
Throws:
java.lang.RuntimeException - if the object is null.

isTrue

public static final void isTrue(java.lang.String expression,
                                boolean value)
Parameters:
expression - The expression to check.
value - The value.
Throws:
java.lang.RuntimeException - if the value is not true.


Copyright 1999-2006 Apache Software Foundation. All Rights Reserved.