uk.ac.ncl.cs.instantsoap.commandlineprocessor.variables
Class Constant

java.lang.Object
  extended by uk.ac.ncl.cs.instantsoap.commandlineprocessor.variables.VariableOrConstant
      extended by uk.ac.ncl.cs.instantsoap.commandlineprocessor.variables.Constant

public class Constant
extends VariableOrConstant

A constant value. During a re-write, these should be replaced by their value.

The value must not be null when the constant is processed.

Author:
Matthe Pocock

Nested Class Summary
 
Nested classes/interfaces inherited from class uk.ac.ncl.cs.instantsoap.commandlineprocessor.variables.VariableOrConstant
VariableOrConstant.VariableOrConstantVisitor
 
Constructor Summary
Constant()
          Create a new constant with no value.
Constant(String value)
          Create a new constant with the given value.
 
Method Summary
 boolean equals(Object o)
           
 String getValue()
          Get the constant value.
 int hashCode()
           
 void setValue(String value)
          Set the constant value.
 String toString()
           
 void visit(VariableOrConstant.VariableOrConstantVisitor visitor)
          Visit this object, calling the handle method specific to the concrete-class.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Constant

public Constant()
Create a new constant with no value.


Constant

public Constant(String value)
Create a new constant with the given value.

Parameters:
value - the constant String value to use
Method Detail

visit

public void visit(VariableOrConstant.VariableOrConstantVisitor visitor)
Description copied from class: VariableOrConstant
Visit this object, calling the handle method specific to the concrete-class.

Specified by:
visit in class VariableOrConstant
Parameters:
visitor - the VariableOrConstantVisitor to process

getValue

public String getValue()
Get the constant value.

Returns:
the constant String

setValue

public void setValue(String value)
Set the constant value.

Parameters:
the - new String constant

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2006-2008. All Rights Reserved.