org.apache.commons.validator
Class Var

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

public class Var
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

A variable can be associate with a Field for passing in information to a pluggable validator.

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

Field Summary
private  java.lang.String jsType
          The optional JavaScript type of the variable.
static java.lang.String JSTYPE_INT
          Int Constant for JavaScript type.
static java.lang.String JSTYPE_REGEXP
          Regular Expression Constant for JavaScript type.
static java.lang.String JSTYPE_STRING
          String Constant for JavaScript type.
private  java.lang.String name
          The name of the variable.
private  java.lang.String value
          The name of the value.
 
Constructor Summary
Var()
           
Var(java.lang.String name, java.lang.String value, java.lang.String jsType)
           
 
Method Summary
 java.lang.Object clone()
          Creates and returns a copy of this object.
 java.lang.String getJsType()
          Gets the JavaScript type of the variable.
 java.lang.String getName()
          Gets the name of the variable.
 java.lang.String getValue()
          Gets the value of the variable.
 void setJsType(java.lang.String jsType)
          Sets the JavaScript type of the variable.
 void setName(java.lang.String name)
          Sets the name of the variable.
 void setValue(java.lang.String value)
          Sets the value of the variable.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

JSTYPE_INT

public static final java.lang.String JSTYPE_INT
Int Constant for JavaScript type. This can be used when auto-generating JavaScript.

JSTYPE_STRING

public static final java.lang.String JSTYPE_STRING
String Constant for JavaScript type. This can be used when auto-generating JavaScript.

JSTYPE_REGEXP

public static final java.lang.String JSTYPE_REGEXP
Regular Expression Constant for JavaScript type. This can be used when auto-generating JavaScript.

name

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

value

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

jsType

private java.lang.String jsType
The optional JavaScript type of the variable.
Constructor Detail

Var

public Var()

Var

public Var(java.lang.String name,
           java.lang.String value,
           java.lang.String jsType)
Method Detail

getName

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

setName

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

getValue

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

setValue

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

getJsType

public java.lang.String getJsType()
Gets the JavaScript type of the variable.

setJsType

public void setJsType(java.lang.String jsType)
Sets the JavaScript type of the variable.

clone

public java.lang.Object clone()
Creates and returns a copy of this object.
Overrides:
clone in class java.lang.Object

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