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
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    isTrue(boolean condition, int errorCode)
    Deprecated.
    static void
    isTrue(boolean condition, String message, int errorCode)
    Deprecated.
    static void
    notNull(Object object)
    Asserts that an object is not null; if it is null, a KurentoMediaFrameworkException is thrown.
    static void
    notNull(Object object, int errorCode)
    Deprecated.
    static void
    notNull(Object object, String message)
    Asserts that an object is not null; if it is null, a KurentoMediaFrameworkException is thrown.
    static void
    notNull(Object object, String message, int errorCode)
    Deprecated.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Assert

      public Assert()
  • Method Details

    • 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
      message - Message to be appended at the end of the description error
      errorCode - Error code which determines the exception to be raise if the object is null
    • 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