org.apache.commons.validator
Class Constant
java.lang.Object
org.apache.commons.validator.Constant
- Serializable
public class Constant
extends java.lang.Object
implements Serializable
A constant can be used to define a global or
locale level constant that can be used to replace
values in certain fields. The Field
's
property field, the Var
's value field,
the Msg
's key field, and the Arg
's
key field can all contain constants reference for replacement.
ex: <constant name="zip" value="^\d{5}$" /> mask="${zip}"
private String | name - The name of the constant.
|
private String | value - The name of the constant.
|
String | getName() - Gets the name of the constant.
|
String | getValue() - Gets the value of the constant.
|
void | setName(String name) - Sets the name of the constant.
|
void | setValue(String value) - Sets the value of the constant.
|
String | toString() - Returns a string representation of the object.
|
name
private String name
The name of the constant.
value
private String value
The name of the constant.
getName
public String getName()
Gets the name of the constant.
- the name o fthe constant.
getValue
public String getValue()
Gets the value of the constant.
- the value of the constant.
setName
public void setName(String name)
Sets the name of the constant.
name
- sets the name of the constant.
setValue
public void setValue(String value)
Sets the value of the constant.
value
- the value of the constant.
toString
public String toString()
Returns a string representation of the object.
- the string representation of the object.
Copyright (c) 2001-2004 Apache Software Foundation