com.dooapp.gaedo.finders.collections.EqualsEvaluator Maven / Gradle / Ivy
package com.dooapp.gaedo.finders.collections;
import java.lang.reflect.Field;
import com.dooapp.gaedo.properties.Property;
/**
* Check if source field value is equals to memoized value
* @author ndx
*
*/
public class EqualsEvaluator extends AbstractBasicEvaluator {
/**
* Checked value
*/
private final Object value;
public EqualsEvaluator(Property source, Object value) {
super(source);
this.value = value;
}
public boolean matches(DataType element) {
Object retrieved = getValue(element);
return (value==null && retrieved==null) || (value!=null && value.equals(retrieved));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy