public class CompareTool.CompareResult extends Object
Modifier and Type | Field and Description |
---|---|
protected Map<CompareTool.ObjectPath,String> |
differences |
protected int |
messageLimit |
Constructor and Description |
---|
CompareResult(int messageLimit)
Creates new empty instance of CompareResult with given limit of difference messages.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addError(CompareTool.ObjectPath path, String message) |
Map<CompareTool.ObjectPath,String> |
getDifferences()
Returns map with CompareTool.ObjectPath as keys and difference descriptions as values.
|
int |
getErrorCount()
Returns number of differences between two documents detected during comparison.
|
String |
getReport()
Converts this CompareResult into text form.
|
protected boolean |
isMessageLimitReached() |
boolean |
isOk()
Verifies if documents are considered equal after comparison.
|
void |
writeReportToXml(OutputStream stream)
Converts this CompareResult into xml form.
|
protected Map<CompareTool.ObjectPath,String> differences
protected int messageLimit
public CompareResult(int messageLimit)
messageLimit
- maximum number of difference messages to be handled by this CompareResult.
public boolean isOk()
public int getErrorCount()
public String getReport()
public Map<CompareTool.ObjectPath,String> getDifferences()
CompareTool.ObjectPath
as keys and difference descriptions as values.
public void writeReportToXml(OutputStream stream) throws ParserConfigurationException, TransformerException
stream
- output stream to which xml report will be written.
ParserConfigurationException
TransformerException
protected boolean isMessageLimitReached()
protected void addError(CompareTool.ObjectPath path, String message)
Copyright © 1998–2020 iText Group NV. All rights reserved.