Class EqualsFilter
java.lang.Object
com.invirgance.convirgance.transform.filter.ComparatorFilter
com.invirgance.convirgance.transform.filter.EqualsFilter
- All Implemented Interfaces:
Filter,Transformer,Predicate<JSONObject>
Used when filtering data that should be equal to some criteria. Supports
ValueGenerator as a value.- Author:
- jbanes
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new EqualsFilter.EqualsFilter(String key, Object value) Creates a new EqualsFilter with the key to evaluate and its expected/comparison value. -
Method Summary
Modifier and TypeMethodDescriptionbooleantest(JSONObject record) Evaluates the provided JSONObject, checking the key and its value to this Filters comparison value.Methods inherited from class com.invirgance.convirgance.transform.filter.ComparatorFilter
getComparator, getKey, getValue, setKey, setValueMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.invirgance.convirgance.transform.Transformer
transform
-
Constructor Details
-
EqualsFilter
public EqualsFilter()Creates a new EqualsFilter. -
EqualsFilter
Creates a new EqualsFilter with the key to evaluate and its expected/comparison value.- Parameters:
key- The key to evaluate for compared Objects.value- The comparison value.
-
-
Method Details
-
test
Evaluates the provided JSONObject, checking the key and its value to this Filters comparison value.- Parameters:
record- The JSONObject to evaluate.- Returns:
- True if the record has the expected key and value.
-