org.apache.commons.validator
Class Constant

java.lang.Object
  |
  +--org.apache.commons.validator.Constant
All Implemented Interfaces:
java.io.Serializable

public class Constant
extends java.lang.Object
implements java.io.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}"

Version:
$Revision: 1.3 $ $Date: 2002/03/30 04:33:17 $
Author:
David Winterfeldt
See Also:
Serialized Form

Field Summary
private  java.lang.String name
          The name of the constant.
private  java.lang.String value
          The name of the constant.
 
Constructor Summary
Constant()
           
 
Method Summary
 java.lang.String getName()
          Gets the name of the constant.
 java.lang.String getValue()
          Gets the value of the constant.
 void setName(java.lang.String name)
          Sets the name of the constant.
 void setValue(java.lang.String value)
          Sets the value of the constant.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

name

private java.lang.String name
The name of the constant.

value

private java.lang.String value
The name of the constant.
Constructor Detail

Constant

public Constant()
Method Detail

getName

public java.lang.String getName()
Gets the name of the constant.

setName

public void setName(java.lang.String name)
Sets the name of the constant.

getValue

public java.lang.String getValue()
Gets the value of the constant.

setValue

public void setValue(java.lang.String value)
Sets the value of the constant.

toString

public java.lang.String toString()
Returns a string representation of the object.
Overrides:
toString in class java.lang.Object


Copyright (c) 2001-2002 - Apache Software Foundation