org.springframework.extensions.surf.util
Class ParameterCheck

java.lang.Object
  extended by org.springframework.extensions.surf.util.ParameterCheck

public final class ParameterCheck
extends Object

Utility class to perform various common parameter checks

Author:
gavinc

Constructor Summary
ParameterCheck()
           
 
Method Summary
static void mandatory(String strParamName, Object object)
          Checks that the parameter with the given name has content i.e.
static void mandatoryCollection(String strParamName, Collection coll)
          Checks that the collection parameter contains at least one item.
static void mandatoryString(String strParamName, 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(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


Copyright © 2009 SpringSource, Inc. All Rights Reserved.