Class ParameterCheck


  • public final class ParameterCheck
    extends Object
    Utility class to perform various common parameter checks
    Author:
    gavinc
    • Constructor Detail

      • ParameterCheck

        public ParameterCheck()
    • Method Detail

      • mandatory

        public static final void mandatory​(String strParamName,
                                           Object object)
        Checks that the parameter with the given name has content i.e. it is not null
        Parameters:
        strParamName - Name of parameter to check
        object - Value of the parameter to check
      • mandatoryString

        public static final void mandatoryString​(String strParamName,
                                                 String strParamValue)
        Checks that the string parameter with the given name has content i.e. it is not null and not zero length
        Parameters:
        strParamName - Name of parameter to check
        strParamValue - Value of the parameter to check
      • mandatoryCollection

        public static final void mandatoryCollection​(String strParamName,
                                                     Collection coll)
        Checks that the collection parameter contains at least one item.
        Parameters:
        strParamName - Name of parameter to check
        coll - collection to check