public class LineReport extends Object implements IPresentation
| Constructor and Description |
|---|
LineReport(RegisterType type,
TableReport table,
INullEmptyHandler nullEmptyHandler)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Column c,
int index,
Object expected,
Object received)
Add register information.
|
nu.xom.Node |
asNode() |
String |
asString() |
Map<String,Integer> |
getColumnsToIndexes()
Get the mapping of columns names to indexes.
|
List<String> |
getExpectedObjects()
List of expected objects.
|
List<String> |
getReceivedObjects()
List of received objects.
|
TableReport |
getTable()
Get parent table report.
|
RegisterType |
getType()
Gets the register type.
|
boolean |
isEmpty()
Check if there are some columns in this line report.
|
protected void |
line(nu.xom.Element tr,
List<String> vals)
Dump a line.
|
protected void |
line(StringBuilder sb,
List<String> list)
Print a line.
|
String |
nullOrEmpty(Column c,
String exp)
As empty or null string.
|
String |
nullOrEmptyWrapp(Column c,
String exp)
Wrapped text.
|
void |
setColumnsToIndexes(Map<String,Integer> columnsToIndexes)
Set column mapping.
|
void |
setExpectedObjects(List<String> expectedObjects)
Set the list of expected objects.
|
void |
setReceivedObjects(List<String> receivedObjects)
Set the list of expected objects.
|
void |
setTable(TableReport table)
Set the table report.
|
void |
setType(RegisterType type)
Set line register type.
|
protected String |
value(Column c,
String exp)
Recover better representation for a value.
|
public LineReport(RegisterType type, TableReport table, INullEmptyHandler nullEmptyHandler)
type - The line type.table - The parent table.nullEmptyHandler - A handler.public RegisterType getType()
public void setType(RegisterType type)
type - The type.public TableReport getTable()
public void setTable(TableReport table)
table - Set the parent report.public Map<String,Integer> getColumnsToIndexes()
public void setColumnsToIndexes(Map<String,Integer> columnsToIndexes)
columnsToIndexes - A new mapping.public List<String> getExpectedObjects()
public void setExpectedObjects(List<String> expectedObjects)
expectedObjects - The list of expected values.public List<String> getReceivedObjects()
public void setReceivedObjects(List<String> receivedObjects)
receivedObjects - The expected objects.public String asString()
asString in interface IPresentationprotected void line(StringBuilder sb, List<String> list)
sb - String representation.list - List of object.public String nullOrEmpty(Column c, String exp)
c - Column.exp - Value.protected String value(Column c, String exp)
c - A column.exp - A expression.public String nullOrEmptyWrapp(Column c, String exp)
c - Column.exp - Value.public nu.xom.Node asNode()
asNode in interface IPresentationprotected void line(nu.xom.Element tr,
List<String> vals)
tr - The element.vals - The values to dump.public void add(Column c, int index, Object expected, Object received)
c - The column.index - The column index.expected - The expected value.received - The received value.public boolean isEmpty()
Copyright © 2017. All rights reserved.