common-util

local.tomas.expr
Class StringConstant

java.lang.Object
  extended by local.tomas.expr.StringConstant
All Implemented Interfaces:
Serializable, Constant, Expression

public class StringConstant
extends Object
implements Constant

Definition of string constant expression.

Author:
Teubner
See Also:
Serialized Form

Constructor Summary
StringConstant()
          Default constructor.
StringConstant(String value)
          Constructor from value.
 
Method Summary
 boolean equals(Object obj)
          Compares this object against the specified object.
 String getValue()
          Get value.
<E,F> E
greet(ExpressionWalker<E,F> visitor, F arg)
          Handle visit of ExpressionWalker.
 int hashCode()
           
 void setValue(String value)
          Set value.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringConstant

public StringConstant()
Default constructor.


StringConstant

public StringConstant(String value)
Constructor from value.

Parameters:
value - string value
Method Detail

getValue

public String getValue()
Get value.

Returns:
value.

setValue

public void setValue(String value)
Set value.

Parameters:
value - string value.

greet

public <E,F> E greet(ExpressionWalker<E,F> visitor,
                     F arg)
        throws ExpressionException
Description copied from interface: Expression
Handle visit of ExpressionWalker.

Specified by:
greet in interface Expression
Parameters:
visitor - the ExpressionWalker visiting this object
arg - implementation dependent argument
Returns:
implementation dependent result
Throws:
ExpressionException

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object obj)
Compares this object against the specified object. The result is true if and only if the argument is not null and is a StringConstant object with equal value as this object.

Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

common-util

Copyright © 2005-2007 Tomas Teubner. All Rights Reserved.