| java.lang.Object org.apache.commons.validator.util.ValidatorUtils
ValidatorUtils | public class ValidatorUtils (Code) | | Basic utility methods.
The use of FastHashMap is deprecated and will be replaced in a future
release.
version: $Revision: 478334 $ $Date: 2006-11-22 21:31:54 +0000 (Wed, 22 Nov 2006) $ |
Method Summary | |
public static FastHashMap | copyFastHashMap(FastHashMap map) Makes a deep copy of a FastHashMap if the values
are Msg , Arg ,
or Var . | public static Map | copyMap(Map map) Makes a deep copy of a Map if the values are
Msg , Arg , or Var . | public static String | getValueAsString(Object bean, String property) Convenience method for getting a value from a bean property as a
String . | public static String | replace(String value, String key, String replaceValue) Replace part of a String with another value.
Parameters: value - String to perform the replacement on. Parameters: key - The name of the constant. Parameters: replaceValue - The value of the constant. |
copyFastHashMap | public static FastHashMap copyFastHashMap(FastHashMap map)(Code) | | Makes a deep copy of a FastHashMap if the values
are Msg , Arg ,
or Var . Otherwise it is a shallow copy.
Parameters: map - FastHashMap to copy. FastHashMap A copy of the FastHashMap that waspassed in. |
copyMap | public static Map copyMap(Map map)(Code) | | Makes a deep copy of a Map if the values are
Msg , Arg , or Var . Otherwise,
it is a shallow copy.
Parameters: map - The source Map to copy. A copy of the Map that was passed in. |
getValueAsString | public static String getValueAsString(Object bean, String property)(Code) | | Convenience method for getting a value from a bean property as a
String . If the property is a String[] or
Collection and it is empty, an empty String
"" is returned. Otherwise, property.toString() is returned. This method
may return null if there was an error retrieving the
property.
Parameters: bean - The bean object. Parameters: property - The name of the property to access. The value of the property. |
replace | public static String replace(String value, String key, String replaceValue)(Code) | | Replace part of a String with another value.
Parameters: value - String to perform the replacement on. Parameters: key - The name of the constant. Parameters: replaceValue - The value of the constant. The modified value. |
|
|