|
EclipseLink 2.5.0, build 'v20130507-3faac2b' API Reference | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.persistence.jpa.jpql.Assert
public final class Assert
An utility class that provides various checks and when the condition fails, then an Assert.AssertException is thrown.
| Nested Class Summary | |
|---|---|
static class |
Assert.AssertException
The exception thrown when the condition is not met. |
| Method Summary | |
|---|---|
static void |
fail(java.lang.String message)
Throws an Assert.AssertException immediately. |
static void |
isEqual(java.lang.Object object1,
java.lang.Object object2,
java.lang.String message)
Determines whether the given two objects are equal (identity). |
static void |
isFalse(boolean condition,
java.lang.String message)
Determines whether the given condition if false or true and if it is
true then an Assert.AssertException is thrown. |
static void |
isNotNull(java.lang.Object object,
java.lang.String message)
Determines whether the given object is not null. |
static void |
isNull(java.lang.Object object,
java.lang.String message)
Determines whether the given object is null. |
static void |
isTrue(boolean condition,
java.lang.String message)
Determines whether the given condition if true or false and if it is
false then an Assert.AssertException is thrown. |
static void |
isValid(java.lang.Object object,
java.lang.String message,
java.lang.Object... choices)
Determines whether the given object is one of the given choices using identity check. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void fail(java.lang.String message)
Assert.AssertException immediately.
message - The message to display
public static void isEqual(java.lang.Object object1,
java.lang.Object object2,
java.lang.String message)
Assert.AssertException is thrown
object1 - The first object used to be compared to the second objectobject2 - The second object used to be compared to the first objectmessage - The expression's message that will describe the reason why the check failed
public static void isFalse(boolean condition,
java.lang.String message)
false or true and if it is
true then an Assert.AssertException is thrown.
condition - The condition to verify it is falsemessage - The expression's message that will describe the reason why the check failed
public static void isNotNull(java.lang.Object object,
java.lang.String message)
null. If the object is null,
then an NullPointerException is thrown
object - The value to check to not be nullmessage - The expression's message that will describe the reason why the check failed
public static void isNull(java.lang.Object object,
java.lang.String message)
null. If the object is not null,
then an Assert.AssertException is thrown
object - The value to check to be nullmessage - The expression's message that will describe the reason why the check failed
public static void isTrue(boolean condition,
java.lang.String message)
true or false and if it is
false then an Assert.AssertException is thrown.
condition - The condition to verify it is truemessage - The expression's message that will describe the reason why the check failed
public static void isValid(java.lang.Object object,
java.lang.String message,
java.lang.Object... choices)
object - The object to find in the list of choicesmessage - The expression's message that will describe the reason why the check failedchoices - The list of valid choices
|
EclipseLink 2.5.0, build 'v20130507-3faac2b' API Reference | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||