Class 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 Detail

      • Assert

        public Assert()
    • 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 null
        errorCode - 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 null
        errorCode - Error code which determines the exception to be raise if the object is null
        message - 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 null
        message - 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 checked
        errorCode - 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 checked
        message - the message to show in case the assertion fails
        errorCode - Error code which determines the exception to be raise if the condition is not met