com.gridsystems.beanfilter
Class BooleanNode
java.lang.Object
com.gridsystems.beanfilter.EvalValue
com.gridsystems.beanfilter.EvalNode
com.gridsystems.beanfilter.BooleanNode
public class BooleanNode
- extends EvalNode
Node that evaluates its internal node as if it is a boolean value.
This node allows the use of boolean fields in the expression, like:
(field = True) ---> (field)
The evaluation result depends on the internal node value type:
- BOOLEAN: (value = True)
- NUMBER: (value <> 0)
- STRING: (value <> '')
- COLLECTION: (value not empty)
- Version:
- 1.0
- Author:
- Rodrigo Ruiz
Method Summary |
boolean |
eval(java.lang.Object src)
Evaluates the node. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
BooleanNode
public BooleanNode(EvalValue value)
- Creates a new instance.
- Parameters:
value
- The value to evaluate as a boolean
eval
public boolean eval(java.lang.Object src)
throws EvalException
- Evaluates the node.
- Specified by:
eval
in class EvalNode
- Parameters:
src
- Data source, for dynamic nodes
- Returns:
true
if src makes true the node
- Throws:
EvalException
- If an error occurs
toString
public java.lang.String toString()
-
- Overrides:
toString
in class java.lang.Object
Copyright © 2007-2008 Grid Systems, S.A.. All Rights Reserved.