Class ParameterCheck


  • public final class ParameterCheck
    extends java.lang.Object
    Utility class to perform various common parameter checks
    Author:
    gavinc
    • Constructor Summary

      Constructors 
      Constructor Description
      ParameterCheck()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void mandatory​(java.lang.String strParamName, java.lang.Object object)
      Checks that the parameter with the given name has content i.e.
      static void mandatoryCollection​(java.lang.String strParamName, java.util.Collection coll)
      Checks that the collection parameter contains at least one item.
      static void mandatoryString​(java.lang.String strParamName, java.lang.String strParamValue)
      Checks that the string parameter with the given name has content i.e.
      • Methods inherited from class java.lang.Object

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

      • ParameterCheck

        public ParameterCheck()
    • Method Detail

      • mandatory

        public static final void mandatory​(java.lang.String strParamName,
                                           java.lang.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​(java.lang.String strParamName,
                                                 java.lang.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​(java.lang.String strParamName,
                                                     java.util.Collection coll)
        Checks that the collection parameter contains at least one item.
        Parameters:
        strParamName - Name of parameter to check
        coll - collection to check