Package org.hcjf.layers.query
Class Equals
- java.lang.Object
-
- org.hcjf.layers.query.BaseEvaluator
-
- org.hcjf.layers.query.FieldEvaluator
-
- org.hcjf.layers.query.Equals
-
- All Implemented Interfaces:
Evaluator
- Direct Known Subclasses:
Distinct
public class Equals extends FieldEvaluator
Compare two object and return true if the objects are equals and false in other ways.- Author:
- javaito
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.hcjf.layers.query.BaseEvaluator
BaseEvaluator.QueryValue, BaseEvaluator.ReplaceableValue, BaseEvaluator.UnprocessedValue
-
-
Constructor Summary
Constructors Constructor Description Equals(java.lang.Object leftValue, java.lang.Object rightValue)
-
Method Summary
Modifier and Type Method Description booleanevaluate(java.lang.Object object, Queryable.DataSource dataSource, Queryable.Consumer consumer)Evaluate if the evaluator's value and the object's value in the specified field of the parameter instance are equals.-
Methods inherited from class org.hcjf.layers.query.FieldEvaluator
containsReference, copy, equals, getLeftValue, getProcessedLeftValue, getProcessedRightValue, getRightValue, numberEquals, toString
-
Methods inherited from class org.hcjf.layers.query.BaseEvaluator
getEvaluatorFields, getProcessedValue, isTrueForced, setEvaluatorFields, setTrueForced
-
-
-
-
Method Detail
-
evaluate
public boolean evaluate(java.lang.Object object, Queryable.DataSource dataSource, Queryable.Consumer consumer)Evaluate if the evaluator's value and the object's value in the specified field of the parameter instance are equals. This method support any kind of object like field value and parameter value too.- Parameters:
object- Instance to obtain the field value.consumer- Data source consumerdataSource- Data source.- Returns:
- True if the two values are equals and false in other ways
- Throws:
java.lang.IllegalArgumentException- If is impossible to get value from instance with introspection.
-
-