com.satline.expr
Class BooleanConstant

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

public class BooleanConstant
extends java.lang.Object
implements Constant

Definition of boolean constant expression.

Author:
Teubner
See Also:
Serialized Form

Field Summary
static BooleanConstant FALSE
           
static BooleanConstant TRUE
           
 
Constructor Summary
BooleanConstant()
          Default constructor.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares this object against the specified object.
static BooleanConstant getInstance(boolean value)
          Return boolean constant.
 java.lang.Boolean getValue()
          Get value.
<E,F> E
greet(ExpressionWalker<E,F> visitor, F arg)
          Handle visit of ExpressionWalker.
 int hashCode()
           
 void setValue(java.lang.Boolean 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
 

Field Detail

FALSE

public static final BooleanConstant FALSE

TRUE

public static final BooleanConstant TRUE
Constructor Detail

BooleanConstant

public BooleanConstant()
Default constructor.

Method Detail

getInstance

public static BooleanConstant getInstance(boolean value)
Return boolean constant.

Parameters:
value - value of constant
Returns:
the constant

getValue

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

Returns:
value.

setValue

public void setValue(java.lang.Boolean 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.