Class ParameterValidator


  • public final class ParameterValidator
    extends Object
    $Id$ [15-May-2004] Defines methods for validating parameters and parameter lists.
    • Method Detail

      • assertOneOrLess

        public static void assertOneOrLess​(String paramName,
                                           ParameterList parameters)
                                    throws ValidationException
        Ensure a parameter occurs no more than once.
        Parameters:
        paramName - the parameter name
        parameters - a list of parameters to query
        Throws:
        ValidationException - when the specified parameter occurs more than once
      • assertOne

        public static void assertOne​(String paramName,
                                     ParameterList parameters)
                              throws ValidationException
        Ensure a parameter occurs once.
        Parameters:
        paramName - the parameter name
        parameters - a list of parameters to query
        Throws:
        ValidationException - when the specified parameter does not occur once
      • assertNone

        public static void assertNone​(String paramName,
                                      ParameterList parameters)
                               throws ValidationException
        Ensure a parameter doesn't occur in the specified list.
        Parameters:
        paramName - the name of a parameter
        parameters - a list of parameters
        Throws:
        ValidationException - thrown when the specified property is found in the list of properties