[CSV-239] Cannot get headers in column order from CSVRecord.
Rename CSVRecord.getCSVParser() -> getParser().
This commit is contained in:
parent
d346048552
commit
6fd5179244
|
@ -79,10 +79,6 @@ public final class CSVRecord implements Serializable, Iterable<String> {
|
|||
return values[i];
|
||||
}
|
||||
|
||||
private Map<String, Integer> getHeaderMapRaw() {
|
||||
return parser.getHeaderMapRaw();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a value by name.
|
||||
*
|
||||
|
@ -138,13 +134,17 @@ public final class CSVRecord implements Serializable, Iterable<String> {
|
|||
return comment;
|
||||
}
|
||||
|
||||
private Map<String, Integer> getHeaderMapRaw() {
|
||||
return parser.getHeaderMapRaw();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the parser.
|
||||
*
|
||||
* @return the parser.
|
||||
* @since 1.7
|
||||
*/
|
||||
public CSVParser getCSVParser() {
|
||||
public CSVParser getParser() {
|
||||
return parser;
|
||||
}
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ public class CSVRecordTest {
|
|||
public void testIsConsistent() {
|
||||
assertTrue(record.isConsistent());
|
||||
assertTrue(recordWithHeader.isConsistent());
|
||||
final Map<String, Integer> map = recordWithHeader.getCSVParser().getHeaderMap();
|
||||
final Map<String, Integer> map = recordWithHeader.getParser().getHeaderMap();
|
||||
map.put("fourth", Integer.valueOf(4));
|
||||
// We are working on a copy of the map, so the record should still be OK.
|
||||
assertTrue(recordWithHeader.isConsistent());
|
||||
|
|
Loading…
Reference in New Issue