Package org.ocpsoft.common.util
Class Assert
java.lang.Object
org.ocpsoft.common.util.Assert
Utility methods for making precondition/postcondition assertions.
- Author:
- Lincoln Baxter, III
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidassertFalse(boolean value, String message) Throw an exception if the given value is not false.static voidassertTrue(boolean value, String message) Throw an exception if the given value is not true.static voidThrow an exception if the givenObjectis not null.static voidThrow an exception if the givenObjectis null.
-
Method Details
-
isNull
Throw an exception if the givenObjectis not null.- Throws:
IllegalArgumentException
-
notNull
Throw an exception if the givenObjectis null.- Throws:
IllegalArgumentException
-
assertTrue
Throw an exception if the given value is not true.- Throws:
IllegalArgumentException
-
assertFalse
Throw an exception if the given value is not false.- Throws:
IllegalArgumentException
-