|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectorg.test4j.hamcrest.matcher.property.difference.Difference
org.test4j.hamcrest.matcher.property.difference.CollectionDifference
public class CollectionDifference
A class for holding the difference between two collections or arrays.
| 构造方法摘要 | |
|---|---|
CollectionDifference(String message,
Object leftValue,
Object rightValue,
List<?> leftList,
List<?> rightList)
Creates a difference. |
|
| 方法摘要 | ||
|---|---|---|
|
accept(DifferenceVisitor<T,A> visitor,
A argument)
Double dispatch method. |
|
void |
addElementDifference(int index,
Difference difference)
Adds a difference for the element at the given index. |
|
void |
addLeftMissingIndex(int index)
Adds an index of a left element that is missing in the right collection. |
|
void |
addRightMissingIndex(int index)
Adds an index of a right element that is missing in the left collection. |
|
Map<Integer,Difference> |
getElementDifferences()
Gets all element differences per index. |
|
List<?> |
getLeftList()
|
|
List<Integer> |
getLeftMissingIndexes()
Gets the indexes of the left elements that were missing in the right collection. |
|
List<?> |
getRightList()
|
|
List<Integer> |
getRightMissingIndexes()
Gets the indexes of the right elements that were missing in the left collection. |
|
| 从类 org.test4j.hamcrest.matcher.property.difference.Difference 继承的方法 |
|---|
getLeftValue, getMessage, getRightValue, toString |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 构造方法详细信息 |
|---|
public CollectionDifference(String message,
Object leftValue,
Object rightValue,
List<?> leftList,
List<?> rightList)
message - A message describing the differenceleftValue - The left instancerightValue - The right instanceleftList - The left instance as a listrightList - The right instance as a list| 方法详细信息 |
|---|
public void addElementDifference(int index,
Difference difference)
index - The element indexdifference - The difference, not nullpublic Map<Integer,Difference> getElementDifferences()
public void addLeftMissingIndex(int index)
index - The left element indexpublic List<Integer> getLeftMissingIndexes()
public void addRightMissingIndex(int index)
index - The right element indexpublic List<Integer> getRightMissingIndexes()
public List<?> getLeftList()
public List<?> getRightList()
public <T,A> T accept(DifferenceVisitor<T,A> visitor,
A argument)
Difference 中的 acceptvisitor - The visitor, not nullargument - An optional argument for the visitor, null if not applicable
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||