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, getFieldsInfo
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
cloneQuietly, cloneQuietly
public AndEvaluator(Evaluator evaluator)
public java.util.List<Evaluator> getEvaluators()
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
Cloneable
clone
in class java.lang.Object
java.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
Evaluator
evaluate
in interface Evaluator
EvaluatorException
- 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()
Evaluator
public void addEvaluator(Evaluator evaluator)
public java.lang.String getSQL()
Evaluator
getSQL
in interface Evaluator
getSQL
in class AbstractEvaluator
public java.lang.String toString()
toString
in class java.lang.Object