use of org.apache.ignite.tests.pojos.SimplePerson in project ignite by apache.
the class TestsHelper method checkSimplePersonMapsEqual.
/**
*/
public static <K> boolean checkSimplePersonMapsEqual(Map<K, SimplePerson> map1, Map<K, SimplePerson> map2, boolean primitiveFieldsOnly) {
if (map1 == null || map2 == null || map1.size() != map2.size())
return false;
for (K key : map1.keySet()) {
SimplePerson person1 = map1.get(key);
SimplePerson person2 = map2.get(key);
boolean equals = person1 != null && person2 != null && (primitiveFieldsOnly ? person1.equalsPrimitiveFields(person2) : person1.equals(person2));
if (!equals)
return false;
}
return true;
}
Aggregations