Class Variable
- java.lang.Object
-
- org.apache.torque.generator.variable.Variable
-
public class Variable extends Object
A variable which can be used to transport data in and between outlets. A variable has a name (possibly with a name space), a value (which may be null), and a scope (determining in which outlets this variable will be visible). if the scope isCHILDREN, the outlet in which this variable was set is also stored in the variable.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVariable.ScopeThe scope of a variable.
-
Constructor Summary
Constructors Constructor Description Variable(QualifiedName name, Object value, Variable.Scope scope)Constructor.
-
Method Summary
Modifier and Type Method Description booleanequals(Object obj)QualifiedNamegetName()Returns the name of the variable.Variable.ScopegetScope()Returns the scope of the variable.ObjectgetValue()Returns the value of the variable,inthashCode()voidsetValue(Object value)Sets the value of the variable.StringtoString()
-
-
-
Constructor Detail
-
Variable
public Variable(QualifiedName name, Object value, Variable.Scope scope)
Constructor.- Parameters:
name- the name of the variable, not null.value- the value of the variable.scope- the scope of the variable, not null.
-
-
Method Detail
-
getName
public QualifiedName getName()
Returns the name of the variable.- Returns:
- the name of the variable, not null.
-
getValue
public Object getValue()
Returns the value of the variable,- Returns:
- the value of the variable, may be null.
-
setValue
public void setValue(Object value)
Sets the value of the variable.- Parameters:
value- the value to set in the variable.
-
getScope
public Variable.Scope getScope()
Returns the scope of the variable.- Returns:
- the scope of the variable, not null.
-
-