org.apache.pluto.util
Class ArgumentUtility
java.lang.Object
org.apache.pluto.util.ArgumentUtility
public class ArgumentUtility
- extends Object
Static class that provides utility static methods for argument validation.
Field Summary |
static org.apache.commons.logging.Log |
LOG
Logger. |
Method Summary |
static void |
validateNotEmpty(String argumentName,
String argument)
Validates that the passed-in string argument value is not null or empty. |
static void |
validateNotNull(String argumentName,
Object argument)
Validates that the passed-in argument value is not null. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
public static final org.apache.commons.logging.Log LOG
- Logger.
ArgumentUtility
public ArgumentUtility()
validateNotNull
public static void validateNotNull(String argumentName,
Object argument)
throws IllegalArgumentException
- Validates that the passed-in argument value is not null.
- Parameters:
argumentName
- the argument name.argument
- the argument value.
- Throws:
IllegalArgumentException
- if the argument value is null.
validateNotEmpty
public static void validateNotEmpty(String argumentName,
String argument)
throws IllegalArgumentException
- Validates that the passed-in string argument value is not null or empty.
- Parameters:
argumentName
- the argument name.argument
- the argument value.
- Throws:
IllegalArgumentException
- if the argument value is null or empty.
Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.