public class AndEvaluator extends AbstractEvaluator implements Cloneable
This evaluator is a set of evaluators that are applied used the and
operator. It means that the evaluate method only returns true
if all the evaluators return true.
A condition to use this type of evaluators is that the evaluate method of all the single evaluators has to return a boolean value.
| Constructor and Description |
|---|
AndEvaluator(Evaluator evaluator) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEvaluator(Evaluator evaluator) |
java.lang.Object |
clone()
Creates a copy of the object.
|
java.lang.Object |
evaluate(EvaluatorData data)
Evaluate with the data passed as parameter.
|
java.util.List<Evaluator> |
getEvaluators() |
java.lang.String |
getName()
Get the symbolic name of the evaluator.
|
java.lang.String |
getSQL()
Get a SQL representation of the evaluator.
|
java.lang.String |
toString() |
getDescription, getFieldsInfoequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcloneQuietly, cloneQuietlypublic AndEvaluator(Evaluator evaluator)
public java.util.List<Evaluator> getEvaluators()
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
Cloneableclone in class java.lang.Objectjava.lang.CloneNotSupportedException - if the instance of the object cannot
be cloned. As this is extending Cloneable so its sure
it implements it, so this exception may be used for problems on specific
object instances.Object#clone()}.public java.lang.Object evaluate(EvaluatorData data) throws EvaluatorException
Evaluatorevaluate in interface EvaluatorEvaluatorException - if an issue is found while evaluating.
The subclass EvaluatorParseException is used to indicate
a problem while parsing (malformed expression) rather than a
problem while evaluating.public java.lang.String getName()
Evaluatorpublic void addEvaluator(Evaluator evaluator)
public java.lang.String getSQL()
EvaluatorgetSQL in interface EvaluatorgetSQL in class AbstractEvaluatorpublic java.lang.String toString()
toString in class java.lang.Object