common-util

local.tomas.expr
Class BooleanConstant

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

public class BooleanConstant
extends Object
implements Constant

Definition of boolean constant expression.

Author:
Teubner
See Also:
Serialized Form

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

Field Detail

FALSE

public static final BooleanConstant FALSE
Constant value false.


TRUE

public static final BooleanConstant TRUE
Constant value 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 Boolean getValue()
Get value.

Returns:
value.

setValue

public void setValue(Boolean value)
Set value.

Parameters:
value - boolean 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 BooleanConstant 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.