com.satline.expr
Class StringConstant

java.lang.Object
  extended by com.satline.expr.StringConstant
All Implemented Interfaces:
Constant, Expression, java.io.Serializable

public class StringConstant
extends java.lang.Object
implements Constant

Definition of string constant expression.

Author:
Teubner
See Also:
Serialized Form

Constructor Summary
StringConstant()
          Default constructor.
StringConstant(java.lang.String value)
          Constructor from value.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares this object against the specified object.
 java.lang.String getValue()
          Get value.
<E,F> E
greet(ExpressionWalker<E,F> visitor, F arg)
          Handle visit of ExpressionWalker.
 int hashCode()
           
 void setValue(java.lang.String value)
          Set value.
 java.lang.String toString()
          Get string representation.
 
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(java.lang.String value)
Constructor from value.

Parameters:
value - - string value
Method Detail

getValue

public java.lang.String getValue()
Get value.

Returns:
value.

setValue

public void setValue(java.lang.String value)
Set value.

Parameters:
value - - string value.

greet

public <E,F> E greet(ExpressionWalker<E,F> visitor,
                     F arg)
        throws ExpressionException
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 java.lang.String toString()
Get string representation.

Overrides:
toString in class java.lang.Object
Returns:
string representation

equals

public boolean equals(java.lang.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 java.lang.Object
Parameters:
obj - - object to compare with
Returns:
true if the objects are the same, false otherwise

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2007 null. All Rights Reserved.