|
Bees v0.5.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--bees.core.Assert
Provides a number of static functions for verifying state in the system.
The basic check() function tests its argument and throws an
exception if it's false/NULL. The require() and
ensure() methods are simply aliases for check()
and used to imply pre/post conditions for functions.
| Inner Class Summary | |
static class |
Assert.AssertFailure
A run-time Error is thrown if an check fails. |
| Method Summary | |
static void |
check(boolean test)
Check a boolean is true. |
static void |
check(boolean test,
java.lang.String msg)
Check a boolean is true. |
static void |
check(java.lang.Object obj)
Check that an object reference is not null. |
static void |
ensure(boolean test)
Ensure a boolean is true. |
static void |
ensure(java.lang.Object obj)
Ensure an object reference is not null. |
static void |
require(boolean test)
Require a boolean to be true. |
static void |
require(java.lang.Object obj)
Require an object reference to be non-null. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static void check(boolean test)
throws Assert.AssertFailure
test - The boolean to test.Assert.AssertFailure - if test if false.
public static void check(boolean test,
java.lang.String msg)
throws Assert.AssertFailure
test - The boolean to test.msg - A description of the tested value.Assert.AssertFailure - if test if false.
public static void check(java.lang.Object obj)
throws Assert.AssertFailure
obj - The object reference to check.Assert.AssertFailure - if obj is null.
public static void require(boolean test)
throws Assert.AssertFailure
test - The boolean to test.Assert.AssertFailure - if test if false.
public static void require(java.lang.Object obj)
throws Assert.AssertFailure
obj - The object reference to check.Assert.AssertFailure - if obj is null
public static void ensure(boolean test)
throws Assert.AssertFailure
test - The boolean to test.Assert.AssertFailure - if test if false.
public static void ensure(java.lang.Object obj)
throws Assert.AssertFailure
obj - The object reference to check.Assert.AssertFailure - if obj is null.
|
Bees v0.5.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||