Package org.eclipse.persistence.jpa.jpql
Class Assert
- java.lang.Object
- 
- org.eclipse.persistence.jpa.jpql.Assert
 
- 
 public final class Assert extends java.lang.ObjectAn utility class that provides various checks and when the condition fails, then anAssert.AssertExceptionis thrown.- Version:
- 2.4
- Author:
- Pascal Filion
- Since:
- 2.4
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classAssert.AssertExceptionThe exception thrown when the condition is not met.
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static voidfail(java.lang.String message)Throws anAssert.AssertExceptionimmediately.static voidisEqual(java.lang.Object object1, java.lang.Object object2, java.lang.String message)Determines whether the given two objects are equal (identity).static voidisFalse(boolean condition, java.lang.String message)Determines whether the given condition iffalseortrueand if it istruethen anAssert.AssertExceptionis thrown.static voidisNotNull(java.lang.Object object, java.lang.String message)Determines whether the given object is notnull.static voidisNull(java.lang.Object object, java.lang.String message)Determines whether the given object isnull.static voidisTrue(boolean condition, java.lang.String message)Determines whether the given condition iftrueorfalseand if it isfalsethen anAssert.AssertExceptionis thrown.static voidisValid(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.
 
- 
- 
- 
Method Detail- 
failpublic static void fail(java.lang.String message) Throws anAssert.AssertExceptionimmediately.- Parameters:
- message- The message to display
 
 - 
isEqualpublic static void isEqual(java.lang.Object object1, java.lang.Object object2, java.lang.String message)Determines whether the given two objects are equal (identity). If the two objects are not identical, then anAssert.AssertExceptionis thrown- Parameters:
- object1- The first object used to be compared to the second object
- object2- The second object used to be compared to the first object
- message- The expression's message that will describe the reason why the check failed
 
 - 
isFalsepublic static void isFalse(boolean condition, java.lang.String message)Determines whether the given condition iffalseortrueand if it istruethen anAssert.AssertExceptionis thrown.- Parameters:
- condition- The condition to verify it is- false
- message- The expression's message that will describe the reason why the check failed
 
 - 
isNotNullpublic static void isNotNull(java.lang.Object object, java.lang.String message)Determines whether the given object is notnull. If the object isnull, then anNullPointerExceptionis thrown- Parameters:
- object- The value to check to not be- null
- message- The expression's message that will describe the reason why the check failed
 
 - 
isNullpublic static void isNull(java.lang.Object object, java.lang.String message)Determines whether the given object isnull. If the object is notnull, then anAssert.AssertExceptionis thrown- Parameters:
- object- The value to check to be- null
- message- The expression's message that will describe the reason why the check failed
 
 - 
isTruepublic static void isTrue(boolean condition, java.lang.String message)Determines whether the given condition iftrueorfalseand if it isfalsethen anAssert.AssertExceptionis thrown.- Parameters:
- condition- The condition to verify it is- true
- message- The expression's message that will describe the reason why the check failed
 
 - 
isValidpublic 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.- Parameters:
- object- The object to find in the list of choices
- message- The expression's message that will describe the reason why the check failed
- choices- The list of valid choices
 
 
- 
 
-