Class ParameterCheck


  • public class ParameterCheck
    extends Object
    Utility class for checking parameters
    Since:
    2.6
    Author:
    Tuna Aksoy
    • Method Detail

      • mandatoryString

        public static void mandatoryString​(String paramName,
                                           String paramValue)
                                    throws IllegalArgumentException
        Checks if a given String is blank or not, i.e. not null, "" or " ".
        Parameters:
        paramName - The name of the parameter to check
        paramValue - The value of the parameter to check
        Throws:
        IllegalArgumentException - Throws an exception if the given value is blank
      • mandatoryObject

        public static void mandatoryObject​(String paramName,
                                           Object object)
                                    throws IllegalArgumentException
        Checks if a given Object is null or not
        Parameters:
        paramName - The name of the parameter to check
        object - The value of the parameter to check
        Throws:
        IllegalArgumentException - Throws an exception if the given value is null