org.apache.commons.validator

Class ValidatorUtil

public class ValidatorUtil extends Object

Deprecated: This class has moved to the org.apache.commons.validator.util package.

Basic utility methods.
Field Summary
protected static Loglog
Logger.
static StringREGEXP_DELIMITER
Delimiter to put around a regular expression following Perl 5 syntax.
Method Summary
static FastHashMapcopyFastHashMap(FastHashMap map)
Makes a deep copy of a FastHashMap if the values are String, Msg, Arg, or Var.
static StringgetDelimitedRegExp(String regexp)
Adds a '/' on either side of the regular expression.
static StringgetValueAsString(Object bean, String property)
Convenience method for getting a value from a bean property as a String.
static Stringreplace(String value, String key, String replaceValue)

Replace part of a String with another value.

Field Detail

log

protected static Log log

Deprecated: Subclasses should use their own logging instance.

Logger.

REGEXP_DELIMITER

public static final String REGEXP_DELIMITER

Deprecated: Use "/" directly.

Delimiter to put around a regular expression following Perl 5 syntax.

Method Detail

copyFastHashMap

public static FastHashMap copyFastHashMap(FastHashMap map)
Makes a deep copy of a FastHashMap if the values are String, Msg, Arg, or Var. Otherwise it is a shallow copy.

Parameters: map FastHashMap to copy.

Returns: FastHashMap A copy of the FastHashMap that was passed in.

getDelimitedRegExp

public static String getDelimitedRegExp(String regexp)

Deprecated: Use "/" directly.

Adds a '/' on either side of the regular expression.

getValueAsString

public static String getValueAsString(Object bean, String property)
Convenience method for getting a value from a bean property as a String.

replace

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. key The name of the constant. replaceValue The value of the constant.

Copyright (c) 2001-2004 Apache Software Foundation