public class DefaultComparisonUtils extends java.lang.Object implements ComparisonUtils
| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultComparisonUtils.EquivalentObjectSeeker |
| Constructor and Description |
|---|
DefaultComparisonUtils() |
| Modifier and Type | Method and Description |
|---|---|
void |
compareCollections(java.util.Collection leftCollection,
java.util.Collection rightCollection,
DiffContext ctx)
Compare collections of
DbObjects using their DbObject#diff(DbObject, Differences) method. |
void |
compareSimple(DbProperty leftProperty,
DbProperty rightProperty,
DiffContext ctx)
Compare two 'simple' (i.e.
|
void |
compareSimpleCollections(DbProperty leftProp,
DbProperty rightProp,
DiffContext ctx)
Compare two collections.
|
void |
compareSimpleOrderedLists(DbProperty refProp,
DbProperty targetProp,
DiffContext ctx)
Compare two
Lists of 'simple' (i.e. |
java.util.List |
findEquivalentObjects(DbObject rootObject,
DbObject objToMatch) |
public java.util.List findEquivalentObjects(DbObject rootObject, DbObject objToMatch)
findEquivalentObjects in interface ComparisonUtilspublic void compareSimpleOrderedLists(DbProperty refProp, DbProperty targetProp, DiffContext ctx)
ComparisonUtilsLists of 'simple' (i.e. non-DbObject) objects. Ordering
is significant - if an element E appears in both collections but at different indexes
then it is not considered to be the same item.compareSimpleOrderedLists in interface ComparisonUtilspublic void compareSimpleCollections(DbProperty leftProp, DbProperty rightProp, DiffContext ctx)
ComparisonUtilsComparisonUtils.compareSimpleOrderedLists(DbProperty, DbProperty, DiffContext)
except that this method operates on Collections and order (and cardinality) is not important. If
an element E from the reference collection appears one or more times at any position in the target collection
then that element is said to be in both with no difference.compareSimpleCollections in interface ComparisonUtilspublic void compareCollections(java.util.Collection leftCollection,
java.util.Collection rightCollection,
DiffContext ctx)
ComparisonUtilsDbObjects using their DbObject#diff(DbObject, Differences) method.compareCollections in interface ComparisonUtilspublic void compareSimple(DbProperty leftProperty, DbProperty rightProperty, DiffContext ctx)
ComparisonUtilsDbObject) objects using their Object.equals(Object) method
to decide if there is a difference.compareSimple in interface ComparisonUtilsCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.