|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectorg.test4j.hamcrest.matcher.property.reflection.MatchingScoreCalculator
public class MatchingScoreCalculator
A utility class to be able to calculate a score of how well 2 elements match. This enables us to find the best matching differences out of all element differences in an unordered collection difference.
| 嵌套类摘要 | |
|---|---|
protected class |
MatchingScoreCalculator.MatchingScoreVisitor
The visitor for visiting the difference tree. |
| 字段摘要 | |
|---|---|
protected Map<Difference,Integer> |
cachedMatchingScores
Cache for matching scores |
protected MatchingScoreCalculator.MatchingScoreVisitor |
matchingScoreVisitor
The visitor for visiting the difference tree |
| 构造方法摘要 | |
|---|---|
MatchingScoreCalculator()
|
|
| 方法摘要 | |
|---|---|
int |
calculateMatchingScore(Difference difference)
Gets the matching score for the given difference. |
protected int |
getMatchingScore(CollectionDifference collectionDifference)
Gets the matching score for a collection difference. |
protected int |
getMatchingScore(Difference difference)
Gets the matching score for a simple difference. |
protected int |
getMatchingScore(MapDifference mapDifference)
Gets the matching score for a map difference. |
protected int |
getMatchingScore(ObjectDifference objectDifference)
Gets the matching score for an object difference. |
protected int |
getMatchingScore(UnorderedCollectionDifference unorderedCollectionDifference)
Gets the matching score for an unordered collection difference. |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 字段详细信息 |
|---|
protected MatchingScoreCalculator.MatchingScoreVisitor matchingScoreVisitor
protected Map<Difference,Integer> cachedMatchingScores
| 构造方法详细信息 |
|---|
public MatchingScoreCalculator()
| 方法详细信息 |
|---|
public int calculateMatchingScore(Difference difference)
difference - The difference
protected int getMatchingScore(Difference difference)
difference - The difference, not null
protected int getMatchingScore(ObjectDifference objectDifference)
objectDifference - The difference, not null
protected int getMatchingScore(MapDifference mapDifference)
mapDifference - The difference, not null
protected int getMatchingScore(CollectionDifference collectionDifference)
collectionDifference - The difference, not null
protected int getMatchingScore(UnorderedCollectionDifference unorderedCollectionDifference)
unorderedCollectionDifference - The difference, not null
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||