| Modifier and Type | Field and Description |
|---|---|
protected Map<Object,Map<Object,Difference>> |
ReflectionComparator.allDifferencesCachedResults |
protected Map<Object,Map<Object,Difference>> |
ReflectionComparator.firstDifferenceCachedResults
A cache of results, so that comparisons are only performed once and infinite loops because of cycles are avoided
A different cache is used dependent on whether only the first difference is required or whether we need all
differences, since the resulting
Difference objects differ. |
| Modifier and Type | Method and Description |
|---|---|
Difference |
ReflectionComparator.getDifference(Object left,
Object right)
Checks whether there is a difference between the left and right objects.
|
Difference |
ReflectionComparator.getDifference(Object left,
Object right,
boolean onlyFirstDifference)
Checks whether there are differences between the left and right objects.
|
| Modifier and Type | Method and Description |
|---|---|
protected Map<Object,Difference> |
ReflectionComparator.getCachedDifference(Object left,
boolean onlyFirstDifference) |
| Modifier and Type | Method and Description |
|---|---|
protected static String |
ReflectionAssert.getFailureMessage(String message,
Difference difference) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
ReflectionComparator.saveResultInCache(Object left,
Map<Object,Difference> cachedResult,
boolean onlyFirstDifference) |
| Modifier and Type | Method and Description |
|---|---|
Difference |
Comparator.compare(Object left,
Object right,
boolean onlyFirstDifference,
ReflectionComparator reflectionComparator)
Compares the given objects and returns the difference (if any).
|
| Modifier and Type | Method and Description |
|---|---|
Difference |
SimpleCasesComparator.compare(Object left,
Object right,
boolean onlyFirstDifference,
ReflectionComparator reflectionComparator)
Compares the given values.
|
Difference |
ObjectComparator.compare(Object left,
Object right,
boolean onlyFirstDifference,
ReflectionComparator reflectionComparator)
Compares the given objects by iterating over the fields and comparing the corresponding values.
|
Difference |
MapComparator.compare(Object left,
Object right,
boolean onlyFirstDifference,
ReflectionComparator reflectionComparator)
Compares the given maps by looping over the keys and comparing their values.
|
Difference |
LenientOrderCollectionComparator.compare(Object left,
Object right,
boolean onlyFirstDifference,
ReflectionComparator reflectionComparator)
Compares the given collections/arrays but ignoring the actual order of the elements.
|
Difference |
LenientNumberComparator.compare(Object left,
Object right,
boolean onlyFirstDifference,
ReflectionComparator reflectionComparator)
Compares the two values by converting them to a double and comparing these double values.
|
Difference |
LenientDatesComparator.compare(Object left,
Object right,
boolean onlyFirstDifference,
ReflectionComparator reflectionComparator)
Compares the given dates.
|
Difference |
IgnoreDefaultsComparator.compare(Object left,
Object right,
boolean onlyFirstDifference,
ReflectionComparator reflectionComparator)
Always returns null: both objects are equal.
|
Difference |
HibernateProxyComparator.compare(Object left,
Object right,
boolean onlyFirstDifference,
ReflectionComparator reflectionComparator)
Compares the given objects.
|
Difference |
CollectionComparator.compare(Object left,
Object right,
boolean onlyFirstDifference,
ReflectionComparator reflectionComparator)
Compared the given collections/arrays.
|
| Modifier and Type | Class and Description |
|---|---|
class |
ClassDifference |
class |
CollectionDifference
A class for holding the difference between two collections or arrays.
|
class |
MapDifference
A class for holding the difference between two collections or arrays.
|
class |
ObjectDifference
A class for holding the difference between two objects.
|
class |
UnorderedCollectionDifference
A class for holding the difference between all elements of two collections or arrays.
|
| Modifier and Type | Method and Description |
|---|---|
Difference |
UnorderedCollectionDifference.getElementDifference(int leftIndex,
int rightIndex)
Gets the difference between the elements with the given indexes.
|
| Modifier and Type | Method and Description |
|---|---|
Map<Integer,Map<Integer,Difference>> |
UnorderedCollectionDifference.getElementDifferences()
Gets all element differences per left index and right index.
|
Map<Integer,Difference> |
CollectionDifference.getElementDifferences()
Gets all element differences per index.
|
Map<String,Difference> |
ObjectDifference.getFieldDifferences()
Gets all differences per field name.
|
Map<Object,Difference> |
MapDifference.getValueDifferences()
Gets all element differences per key.
|
| Modifier and Type | Method and Description |
|---|---|
void |
CollectionDifference.addElementDifference(int index,
Difference difference)
Adds a difference for the element at the given index.
|
void |
UnorderedCollectionDifference.addElementDifference(int leftIndex,
int rightIndex,
Difference difference)
Adds a difference or a match for the elements at the given left and right index.
|
void |
ObjectDifference.addFieldDifference(String fieldName,
Difference difference)
Adds a difference for the field with the given name.
|
void |
MapDifference.addValueDifference(Object key,
Difference difference)
Adds a difference for the element at the given key.
|
T |
DifferenceVisitor.visit(Difference difference,
A argument)
Visits a simple difference.
|
| Modifier and Type | Method and Description |
|---|---|
String |
DifferenceReport.createReport(Difference difference)
Creates a report.
|
String |
DifferenceView.createView(Difference difference)
Creates a string representation of the given difference tree.
|
| Modifier and Type | Method and Description |
|---|---|
String |
DefaultDifferenceReport.createReport(Difference difference)
Creates a report.
|
String |
TreeDifferenceView.createView(Difference difference)
Creates a string representation of the given difference tree.
|
String |
SimpleDifferenceView.createView(Difference difference)
Creates a string representation of the given difference tree.
|
String |
DefaultDifferenceView.createView(Difference difference)
Creates a string representation of the given difference tree.
|
protected String |
TreeDifferenceView.formatDifference(Difference difference,
String fieldName)
Creates a string representation of a simple difference.
|
protected String |
DefaultDifferenceView.formatDifference(Difference difference,
String fieldName)
Creates a string representation of a simple difference.
|
String |
TreeDifferenceView.TreeDifferenceFormatterVisitor.visit(Difference difference,
String fieldName) |
String |
DefaultDifferenceView.DifferenceFormatterVisitor.visit(Difference difference,
String fieldName) |
| Modifier and Type | Field and Description |
|---|---|
protected Map<Difference,Integer> |
MatchingScoreCalculator.cachedMatchingScores
Cache for matching scores
|
| Modifier and Type | Method and Description |
|---|---|
static Difference |
InnerDifferenceFinder.getInnerDifference(String fieldName,
Difference difference)
Gets the difference at the given element/field/key (depending on the type of the given difference)
|
Difference |
InnerDifferenceFinder.InnerDifferenceVisitor.visit(ClassDifference classDifference,
String argument) |
Difference |
InnerDifferenceFinder.InnerDifferenceVisitor.visit(CollectionDifference collectionDifference,
String indexString)
Returns the difference at the field with the given index.
|
Difference |
InnerDifferenceFinder.InnerDifferenceVisitor.visit(Difference difference,
String key)
Returns null, there are no inner differences for a simple difference.
|
Difference |
InnerDifferenceFinder.InnerDifferenceVisitor.visit(MapDifference mapDifference,
String keyString)
Returns the difference at the given key.
|
Difference |
InnerDifferenceFinder.InnerDifferenceVisitor.visit(ObjectDifference objectDifference,
String fieldName)
Returns the difference at the field with the given name.
|
Difference |
InnerDifferenceFinder.InnerDifferenceVisitor.visit(UnorderedCollectionDifference unorderedCollectionDifference,
String indexString)
Returns the best matching difference at the field with the given index.
|
| Modifier and Type | Method and Description |
|---|---|
int |
MatchingScoreCalculator.calculateMatchingScore(Difference difference)
Gets the matching score for the given difference.
|
static Difference |
InnerDifferenceFinder.getInnerDifference(String fieldName,
Difference difference)
Gets the difference at the given element/field/key (depending on the type of the given difference)
|
protected int |
MatchingScoreCalculator.getMatchingScore(Difference difference)
Gets the matching score for a simple difference.
|
Integer |
MatchingScoreCalculator.MatchingScoreVisitor.visit(Difference difference,
Integer argument) |
Difference |
InnerDifferenceFinder.InnerDifferenceVisitor.visit(Difference difference,
String key)
Returns null, there are no inner differences for a simple difference.
|
Copyright © 2016. All Rights Reserved.