Class CheckParameters

    • Constructor Detail

      • CheckParameters

        CheckParameters()
    • Method Detail

      • checkArgument

         static boolean checkArgument(boolean expression, String errorMessageTemplate, Array<Object> errorMessageArgs)

        Ensures the truth of an expression involving one or more parameters to the calling method.

        Parameters:
        expression - a boolean expression
        errorMessageTemplate - a template for the exception message should the check fail.
        errorMessageArgs - the arguments to be substituted into the message template.
        Returns:

        false if expression is false, true if correct. Only in RELEASE build.

      • isNullOrEmpty

         static boolean isNullOrEmpty(String str, String errorMessageTemplate, Array<Object> errorMessageArgs)

        Ensures the given String is valid (not null and not empty).

        Parameters:
        str - a String to check
        errorMessageTemplate - a template for the exception message should the check fail.
        errorMessageArgs - the arguments to be substituted into the message template.
        Returns:

        true if str is null or empty, false if valid. Only in RELEASE build.

      • isNullOrEmpty

         static boolean isNullOrEmpty(Array<byte> array, String errorMessageTemplate, Array<Object> errorMessageArgs)

        Ensures the given array is valid (not null and not empty).

        Parameters:
        array - an array to check
        errorMessageTemplate - a template for the exception message should the check fail.
        errorMessageArgs - the arguments to be substituted into the message template.
        Returns:

        true if str is null or empty, false if valid. Only in RELEASE build.

      • isNullOrEmpty

         static boolean isNullOrEmpty(Array<boolean> array, String errorMessageTemplate, Array<Object> errorMessageArgs)

        Ensures the given array is valid (not null and not empty).

        Parameters:
        array - an array to check
        errorMessageTemplate - a template for the exception message should the check fail.
        errorMessageArgs - the arguments to be substituted into the message template.
        Returns:

        true if str is null or empty, false if valid. Only in RELEASE build.

      • checkMaskSize

         static boolean checkMaskSize(String mask, int sizeIndicatedInBytes)

        Verify if size of mask is coherent with the sizeIndicated

        Returns:

        true if OK, false if inconsistent

      • checkDeviation

         static boolean checkDeviation(int deviation, int modulation)

        Check deviation only if modulation is 2FSK/4FSK/GFSK