Skip to content

Commit 474b7f4

Browse files
davidmotengarydgregory
authored andcommitted
[CSV-239] Add javadoc to CSVFormat (apache#42)
1 parent dca9999 commit 474b7f4

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

src/main/java/org/apache/commons/csv/CSVFormat.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -880,6 +880,11 @@ public String format(final Object... values) {
880880
}
881881
}
882882

883+
/**
884+
* Returns true if and only if duplicate names are allowed in the headers.
885+
*
886+
* @return whether duplicate header names are allowed
887+
*/
883888
public boolean getAllowDuplicateHeaderNames() {
884889
return allowDuplicateHeaderNames;
885890
}
@@ -1673,10 +1678,20 @@ private void validate() throws IllegalArgumentException {
16731678
}
16741679
}
16751680

1681+
/**
1682+
* Returns a new {@code CSVFormat} that allows duplicate header names.
1683+
*
1684+
* @return a new {@code CSVFormat} that allows duplicate header names
1685+
*/
16761686
public CSVFormat withAllowDuplicateHeaderNames() {
16771687
return withAllowDuplicateHeaderNames(true);
16781688
}
16791689

1690+
/**
1691+
* Returns a new {@code CSVFormat} with duplicate header names behaviour set to the given value.
1692+
*
1693+
* @return a new {@code CSVFormat} with duplicate header names behaviour set to the given value
1694+
*/
16801695
public CSVFormat withAllowDuplicateHeaderNames(final boolean allowDuplicateHeaderNames) {
16811696
return new CSVFormat(delimiter, quoteCharacter, quoteMode, commentMarker, escapeCharacter,
16821697
ignoreSurroundingSpaces, ignoreEmptyLines, recordSeparator, nullString, headerComments, header,

0 commit comments

Comments
 (0)