Add a toBuilder method to do:

CSVFormat format = CSVFormat.EXCEL.toBuilder().withHeader("Col1", "Col2", "Col3").build();
Instead of:
CSVFormat format = CSVFormat.newBuilder(CSVFormat.EXCEL).withHeader("Col1", "Col2", "Col3").build();


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1460255 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary D. Gregory 2013-03-24 02:03:16 +00:00
parent 6b2a504564
commit b01898391d
1 changed files with 2 additions and 0 deletions

View File

@ -53,6 +53,8 @@ public class CSVFormatBuilderTest {
public void testCopiedFormatIsEqualToOriginal() {
final CSVFormat copyOfRCF4180 = CSVFormat.newBuilder(RFC4180).build();
assertEquals(RFC4180, copyOfRCF4180);
final CSVFormat copy2OfRCF4180 = RFC4180.toBuilder().build();
assertEquals(RFC4180, copy2OfRCF4180);
}
@Test