org.apache.commons.validator

Class ValidatorUtil


public class ValidatorUtil
extends java.lang.Object

Basic utility methods.

Field Summary

static String
REGEXP_DELIMITER
Deprecated. Use "/" directly.
protected static Log
log
Deprecated. Subclasses should use their own logging instance.

Method Summary

static FastHashMap
copyFastHashMap(FastHashMap map)
Makes a deep copy of a FastHashMap if the values are String, Msg, Arg, or Var.
static String
getDelimitedRegExp(String regexp)
Deprecated. Use "/" directly.
static String
getValueAsString(Object bean, String property)
Convenience method for getting a value from a bean property as a String.
static String
replace(String value, String key, String replaceValue)
Replace part of a String with another value.

Field Details

REGEXP_DELIMITER

public static final String REGEXP_DELIMITER

Deprecated. Use "/" directly.

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

log

protected static Log log

Deprecated. Subclasses should use their own logging instance.

Logger.

Method Details

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