common-util

local.tomas.expr.eval
Class BooleanValue

java.lang.Object
  extended by local.tomas.expr.eval.ExpressionValue
      extended by local.tomas.expr.eval.BooleanValue

public class BooleanValue
extends ExpressionValue

Boolean expression value.

Author:
tomas.teubner

Field Summary
static BooleanValue FALSE
          Singleton for false.
static BooleanValue TRUE
          Singleton for true.
 
Fields inherited from class local.tomas.expr.eval.ExpressionValue
NULL
 
Method Summary
 ExpressionValue evalAnd(ExpressionValue right)
          Evaluate and.
 ExpressionValue evalCountFunction()
          Evaluate count function.
 ExpressionValue evalEquality(ExpressionValue right)
          Evaluate equality comparison.
 ExpressionValue evalInequality(ExpressionValue right)
          Evaluate inequality comparison.
 ExpressionValue evalNegation()
          Evaluate negation.
 ExpressionValue evalOrTerm(ExpressionValue right)
          Evaluate or term.
static BooleanValue getInstance(boolean value)
          Get singleton instance with specified value.
 Object getObjectValue()
          Return the Java object representing this expression value.
 ExpressionType getType()
          Get the type of this expression value.
 boolean getValue()
          Get the value.
 void setValue(boolean value)
          Set the value.
 String toString()
           
 
Methods inherited from class local.tomas.expr.eval.ExpressionValue
create, evalAbsFunction, evalAddition, evalAvgFunction, evalConcatenation, evalDivision, evalGreaterEqual, evalGreaterThan, evalInTerm, evalIsNotNull, evalIsNull, evalLengthFunction, evalLessEqual, evalLessThan, evalLike, evalLowerFunction, evalMatch, evalMaxFunction, evalMinFunction, evalMultiplication, evalNotLikeTerm, evalReplaceFunction, evalSignChange, evalSubstrFunction, evalSubtraction, evalSumFunction, evalTrimFunction, evalUpperFunction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FALSE

public static final BooleanValue FALSE
Singleton for false.


TRUE

public static final BooleanValue TRUE
Singleton for true.

Method Detail

getInstance

public static BooleanValue getInstance(boolean value)
Get singleton instance with specified value.

Parameters:
value - the value
Returns:
the instance

getValue

public boolean getValue()
Get the value.

Returns:
Returns the value.

setValue

public void setValue(boolean value)
Set the value.

Parameters:
value - The value to set.

getType

public ExpressionType getType()
Description copied from class: ExpressionValue
Get the type of this expression value.

Specified by:
getType in class ExpressionValue
Returns:
the type

getObjectValue

public Object getObjectValue()
Description copied from class: ExpressionValue
Return the Java object representing this expression value.

Specified by:
getObjectValue in class ExpressionValue
Returns:
the Java object

evalAnd

public ExpressionValue evalAnd(ExpressionValue right)
                        throws ExpressionException
Description copied from class: ExpressionValue
Evaluate and.

Overrides:
evalAnd in class ExpressionValue
Parameters:
right - right operand
Returns:
result
Throws:
ExpressionException

evalCountFunction

public ExpressionValue evalCountFunction()
Description copied from class: ExpressionValue
Evaluate count function.

Overrides:
evalCountFunction in class ExpressionValue
Returns:
constant integer value 1

evalEquality

public ExpressionValue evalEquality(ExpressionValue right)
                             throws ExpressionException
Description copied from class: ExpressionValue
Evaluate equality comparison.

Overrides:
evalEquality in class ExpressionValue
Parameters:
right - right operand
Returns:
result
Throws:
ExpressionException

evalInequality

public ExpressionValue evalInequality(ExpressionValue right)
                               throws ExpressionException
Description copied from class: ExpressionValue
Evaluate inequality comparison.

Overrides:
evalInequality in class ExpressionValue
Parameters:
right - right operand
Returns:
result
Throws:
ExpressionException

evalNegation

public ExpressionValue evalNegation()
Description copied from class: ExpressionValue
Evaluate negation.

Overrides:
evalNegation in class ExpressionValue
Returns:
negated value of this one

evalOrTerm

public ExpressionValue evalOrTerm(ExpressionValue right)
                           throws ExpressionException
Description copied from class: ExpressionValue
Evaluate or term.

Overrides:
evalOrTerm in class ExpressionValue
Parameters:
right - right operand
Returns:
result
Throws:
ExpressionException

toString

public String toString()
Overrides:
toString in class Object

common-util

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