Package org.kurento.commons.exception
Class Assert
- java.lang.Object
-
- org.kurento.commons.exception.Assert
-
public class Assert extends Object
Assertion class to validate parameters within Content API.- Version:
- 1.0.0
- Author:
- Boni GarcĂa (bgarcia@gsyc.es)
-
-
Constructor Summary
Constructors Constructor Description Assert()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static voidisTrue(boolean condition, int errorCode)Deprecated.static voidisTrue(boolean condition, String message, int errorCode)Deprecated.static voidnotNull(Object object)Asserts that an object is not null; if it is null, a KurentoMediaFrameworkException is thrown.static voidnotNull(Object object, int errorCode)Deprecated.static voidnotNull(Object object, String message)Asserts that an object is not null; if it is null, a KurentoMediaFrameworkException is thrown.static voidnotNull(Object object, String message, int errorCode)Deprecated.
-
-
-
Method Detail
-
notNull
@Deprecated public static void notNull(Object object, int errorCode)
Deprecated.Asserts that an object is not null; if it is null, a KurentoMediaFrameworkException is thrown.- Parameters:
object- Object to be checked whether or not is nullerrorCode- Error code which determines the exception to be raise if the object is null
-
notNull
public static void notNull(Object object)
Asserts that an object is not null; if it is null, a KurentoMediaFrameworkException is thrown.- Parameters:
object- Object to be checked whether or not is null
-
notNull
@Deprecated public static void notNull(Object object, String message, int errorCode)
Deprecated.Asserts that an object is not null; if it is null, a KurentoMediaFrameworkException is thrown. In addition, a message passed as parameter is appended at the end of the error description.- Parameters:
object- Object to be checked whether or not is nullerrorCode- Error code which determines the exception to be raise if the object is nullmessage- Message to be appended at the end of the description error
-
notNull
public static void notNull(Object object, String message)
Asserts that an object is not null; if it is null, a KurentoMediaFrameworkException is thrown. In addition, a message passed as parameter is appended at the end of the error description.- Parameters:
object- Object to be checked whether or not is nullmessage- Message to be appended at the end of the description error
-
isTrue
@Deprecated public static void isTrue(boolean condition, int errorCode)
Deprecated.Asserts whether or not a condition is met; if not, a KurentoMediaFrameworkException is thrown. In addition, a message passed as parameter is appended at the end of the error description.- Parameters:
condition- Boolean condition to be checkederrorCode- Error code which determines the exception to be raise if the condition is not met
-
isTrue
@Deprecated public static void isTrue(boolean condition, String message, int errorCode)
Deprecated.Asserts whether or not a condition is met; if not, a KurentoMediaFrameworkException is thrown.- Parameters:
condition- Boolean condition to be checkedmessage- the message to show in case the assertion failserrorCode- Error code which determines the exception to be raise if the condition is not met
-
-