Skip to content
This repository has been archived by the owner on Jan 22, 2019. It is now read-only.

Commit

Permalink
Merge pull request #131 from ansell/issue-130-fluent-addcolumns
Browse files Browse the repository at this point in the history
issue#130 : Add fluent addColumns operation to CsvSchema.Builder
  • Loading branch information
cowtowncoder committed Aug 25, 2016
2 parents 749200a + b717360 commit 236e643
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/main/java/com/fasterxml/jackson/dataformat/csv/CsvSchema.java
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,19 @@ public Builder addColumn(Column c) {
_columns.add(c);
return this;
}
public Builder addColumns(Iterable<Column> cs) {
for (Column c : cs) {
_columns.add(c);
}
return this;
}
public Builder addColumns(Iterable<String> names, ColumnType type) {
Builder result = this;
for (String name : names) {
result = addColumn(name, type);
}
return result;
}

public Builder addArrayColumn(String name) {
int index = _columns.size();
Expand Down

0 comments on commit 236e643

Please sign in to comment.