You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Verifies the validity and consistency of the attributes, and throws an IllegalArgumentException if necessary.
2267
+
* Verifies the validity and consistency of the attributes, and throws an {@link IllegalArgumentException} if necessary.
2268
+
* <p>
2269
+
* Because an instance can be used for both writing an parsing, not all conditions can be tested here. For example allowMissingColumnNames is only used for
2270
+
* parsing, so it cannot be used here.
2271
+
* </p>
2255
2272
*
2256
2273
* @throws IllegalArgumentException Throw when any attribute is invalid or inconsistent with other attributes.
@@ -2340,7 +2357,7 @@ public CSVFormat withAllowMissingColumnNames() {
2340
2357
}
2341
2358
2342
2359
/**
2343
-
* Returns a new {@code CSVFormat} with the missing column names behavior of the format set to the given value.
2360
+
* Builds a new {@code CSVFormat} with the missing column names behavior of the format set to the given value.
2344
2361
*
2345
2362
* @param allowMissingColumnNames the missing column names behavior, {@code true} to allow missing column names in the header line, {@code false} to cause
2346
2363
* an {@link IllegalArgumentException} to be thrown.
@@ -2353,7 +2370,7 @@ public CSVFormat withAllowMissingColumnNames(final boolean allowMissingColumnNam
2353
2370
}
2354
2371
2355
2372
/**
2356
-
* Returns a new {@code CSVFormat} with whether to flush on close.
2373
+
* Builds a new {@code CSVFormat} with whether to flush on close.
2357
2374
*
2358
2375
* @param autoFlush whether to flush on close.
2359
2376
*
@@ -2367,7 +2384,7 @@ public CSVFormat withAutoFlush(final boolean autoFlush) {
2367
2384
}
2368
2385
2369
2386
/**
2370
-
* Returns a new {@code CSVFormat} with the comment start marker of the format set to the specified character.
2387
+
* Builds a new {@code CSVFormat} with the comment start marker of the format set to the specified character.
2371
2388
*
2372
2389
* Note that the comment start character is only recognized at the start of a line.
2373
2390
*
@@ -2382,7 +2399,7 @@ public CSVFormat withCommentMarker(final char commentMarker) {
2382
2399
}
2383
2400
2384
2401
/**
2385
-
* Returns a new {@code CSVFormat} with the comment start marker of the format set to the specified character.
2402
+
* Builds a new {@code CSVFormat} with the comment start marker of the format set to the specified character.
2386
2403
*
2387
2404
* Note that the comment start character is only recognized at the start of a line.
2388
2405
*
@@ -2397,7 +2414,7 @@ public CSVFormat withCommentMarker(final Character commentMarker) {
2397
2414
}
2398
2415
2399
2416
/**
2400
-
* Returns a new {@code CSVFormat} with the delimiter of the format set to the specified character.
2417
+
* Builds a new {@code CSVFormat} with the delimiter of the format set to the specified character.
2401
2418
*
2402
2419
* @param delimiter the delimiter character
2403
2420
* @return A new CSVFormat that is equal to this with the specified character as delimiter
@@ -2410,7 +2427,7 @@ public CSVFormat withDelimiter(final char delimiter) {
2410
2427
}
2411
2428
2412
2429
/**
2413
-
* Returns a new {@code CSVFormat} with the escape character of the format set to the specified character.
2430
+
* Builds a new {@code CSVFormat} with the escape character of the format set to the specified character.
2414
2431
*
2415
2432
* @param escape the escape character
2416
2433
* @return A new CSVFormat that is equal to this but with the specified character as the escape character
@@ -2423,7 +2440,7 @@ public CSVFormat withEscape(final char escape) {
2423
2440
}
2424
2441
2425
2442
/**
2426
-
* Returns a new {@code CSVFormat} with the escape character of the format set to the specified character.
2443
+
* Builds a new {@code CSVFormat} with the escape character of the format set to the specified character.
2427
2444
*
2428
2445
* @param escape the escape character, use {@code null} to disable
2429
2446
* @return A new CSVFormat that is equal to this but with the specified character as the escape character
@@ -2436,7 +2453,7 @@ public CSVFormat withEscape(final Character escape) {
2436
2453
}
2437
2454
2438
2455
/**
2439
-
* Returns a new {@code CSVFormat} using the first record as header.
2456
+
* Builds a new {@code CSVFormat} using the first record as header.
2440
2457
*
2441
2458
* <p>
2442
2459
* Calling this method is equivalent to calling:
@@ -2463,7 +2480,7 @@ public CSVFormat withFirstRecordAsHeader() {
2463
2480
}
2464
2481
2465
2482
/**
2466
-
* Returns a new {@code CSVFormat} with the header of the format defined by the enum class.
2483
+
* Builds a new {@code CSVFormat} with the header of the format defined by the enum class.
* Returns a new {@code CSVFormat} with the header of the format set from the result set metadata. The header can either be parsed automatically from the
2513
+
* Builds a new {@code CSVFormat} with the header of the format set from the result set metadata. The header can either be parsed automatically from the
* Returns a new {@code CSVFormat} with the header of the format set from the result set metadata. The header can either be parsed automatically from the
2541
+
* Builds a new {@code CSVFormat} with the header of the format set from the result set metadata. The header can either be parsed automatically from the
* Returns a new {@code CSVFormat} with the header of the format set to the given values. The header can either be parsed automatically from the input file
2569
+
* Builds a new {@code CSVFormat} with the header of the format set to the given values. The header can either be parsed automatically from the input file
2553
2570
* with:
2554
2571
*
2555
2572
* <pre>
@@ -2576,7 +2593,7 @@ public CSVFormat withHeader(final String... header) {
2576
2593
}
2577
2594
2578
2595
/**
2579
-
* Returns a new {@code CSVFormat} with the header comments of the format set to the given values. The comments will be printed first, before the headers.
2596
+
* Builds a new {@code CSVFormat} with the header comments of the format set to the given values. The comments will be printed first, before the headers.
2580
2597
* This setting is ignored by the parser.
2581
2598
*
2582
2599
* <pre>
@@ -2595,7 +2612,7 @@ public CSVFormat withHeaderComments(final Object... headerComments) {
2595
2612
}
2596
2613
2597
2614
/**
2598
-
* Returns a new {@code CSVFormat} with the empty line skipping behavior of the format set to {@code true}.
2615
+
* Builds a new {@code CSVFormat} with the empty line skipping behavior of the format set to {@code true}.
2599
2616
*
2600
2617
* @return A new CSVFormat that is equal to this but with the specified empty line skipping behavior.
2601
2618
* @see Builder#setIgnoreEmptyLines(boolean)
@@ -2608,7 +2625,7 @@ public CSVFormat withIgnoreEmptyLines() {
2608
2625
}
2609
2626
2610
2627
/**
2611
-
* Returns a new {@code CSVFormat} with the empty line skipping behavior of the format set to the given value.
2628
+
* Builds a new {@code CSVFormat} with the empty line skipping behavior of the format set to the given value.
2612
2629
*
2613
2630
* @param ignoreEmptyLines the empty line skipping behavior, {@code true} to ignore the empty lines between the records, {@code false} to translate empty
2614
2631
* lines to empty records.
@@ -2621,7 +2638,7 @@ public CSVFormat withIgnoreEmptyLines(final boolean ignoreEmptyLines) {
2621
2638
}
2622
2639
2623
2640
/**
2624
-
* Returns a new {@code CSVFormat} with the header ignore case behavior set to {@code true}.
2641
+
* Builds a new {@code CSVFormat} with the header ignore case behavior set to {@code true}.
2625
2642
*
2626
2643
* @return A new CSVFormat that will ignore case header name.
2627
2644
* @see Builder#setIgnoreHeaderCase(boolean)
@@ -2634,7 +2651,7 @@ public CSVFormat withIgnoreHeaderCase() {
2634
2651
}
2635
2652
2636
2653
/**
2637
-
* Returns a new {@code CSVFormat} with whether header names should be accessed ignoring case.
2654
+
* Builds a new {@code CSVFormat} with whether header names should be accessed ignoring case.
2638
2655
*
2639
2656
* @param ignoreHeaderCase the case mapping behavior, {@code true} to access name/values, {@code false} to leave the mapping as is.
2640
2657
* @return A new CSVFormat that will ignore case header name if specified as {@code true}
@@ -2647,7 +2664,7 @@ public CSVFormat withIgnoreHeaderCase(final boolean ignoreHeaderCase) {
2647
2664
}
2648
2665
2649
2666
/**
2650
-
* Returns a new {@code CSVFormat} with the parser trimming behavior of the format set to {@code true}.
2667
+
* Builds a new {@code CSVFormat} with the parser trimming behavior of the format set to {@code true}.
2651
2668
*
2652
2669
* @return A new CSVFormat that is equal to this but with the specified parser trimming behavior.
@@ -2660,7 +2677,7 @@ public CSVFormat withIgnoreSurroundingSpaces() {
2660
2677
}
2661
2678
2662
2679
/**
2663
-
* Returns a new {@code CSVFormat} with the parser trimming behavior of the format set to the given value.
2680
+
* Builds a new {@code CSVFormat} with the parser trimming behavior of the format set to the given value.
2664
2681
*
2665
2682
* @param ignoreSurroundingSpaces the parser trimming behavior, {@code true} to remove the surrounding spaces, {@code false} to leave the spaces as is.
2666
2683
* @return A new CSVFormat that is equal to this but with the specified trimming behavior.
@@ -2672,7 +2689,7 @@ public CSVFormat withIgnoreSurroundingSpaces(final boolean ignoreSurroundingSpac
2672
2689
}
2673
2690
2674
2691
/**
2675
-
* Returns a new {@code CSVFormat} with conversions to and from null for strings on input and output.
2692
+
* Builds a new {@code CSVFormat} with conversions to and from null for strings on input and output.
2676
2693
* <ul>
2677
2694
* <li><strong>Reading:</strong> Converts strings equal to the given {@code nullString} to {@code null} when reading records.</li>
2678
2695
* <li><strong>Writing:</strong> Writes {@code null} as the given {@code nullString} when writing records.</li>
@@ -2688,7 +2705,7 @@ public CSVFormat withNullString(final String nullString) {
2688
2705
}
2689
2706
2690
2707
/**
2691
-
* Returns a new {@code CSVFormat} with the quoteChar of the format set to the specified character.
2708
+
* Builds a new {@code CSVFormat} with the quoteChar of the format set to the specified character.
2692
2709
*
2693
2710
* @param quoteChar the quote character
2694
2711
* @return A new CSVFormat that is equal to this but with the specified character as quoteChar
@@ -2701,7 +2718,7 @@ public CSVFormat withQuote(final char quoteChar) {
2701
2718
}
2702
2719
2703
2720
/**
2704
-
* Returns a new {@code CSVFormat} with the quoteChar of the format set to the specified character.
2721
+
* Builds a new {@code CSVFormat} with the quoteChar of the format set to the specified character.
2705
2722
*
2706
2723
* @param quoteChar the quote character, use {@code null} to disable.
2707
2724
* @return A new CSVFormat that is equal to this but with the specified character as quoteChar
@@ -2714,7 +2731,7 @@ public CSVFormat withQuote(final Character quoteChar) {
2714
2731
}
2715
2732
2716
2733
/**
2717
-
* Returns a new {@code CSVFormat} with the output quote policy of the format set to the specified value.
2734
+
* Builds a new {@code CSVFormat} with the output quote policy of the format set to the specified value.
2718
2735
*
2719
2736
* @param quoteMode the quote policy to use for output.
2720
2737
*
@@ -2727,7 +2744,7 @@ public CSVFormat withQuoteMode(final QuoteMode quoteMode) {
2727
2744
}
2728
2745
2729
2746
/**
2730
-
* Returns a new {@code CSVFormat} with the record separator of the format set to the specified character.
2747
+
* Builds a new {@code CSVFormat} with the record separator of the format set to the specified character.
2731
2748
*
2732
2749
* <p>
2733
2750
* <strong>Note:</strong> This setting is only used during printing and does not affect parsing. Parsing currently only works for inputs with '\n', '\r' and
@@ -2744,7 +2761,7 @@ public CSVFormat withRecordSeparator(final char recordSeparator) {
2744
2761
}
2745
2762
2746
2763
/**
2747
-
* Returns a new {@code CSVFormat} with the record separator of the format set to the specified String.
2764
+
* Builds a new {@code CSVFormat} with the record separator of the format set to the specified String.
2748
2765
*
2749
2766
* <p>
2750
2767
* <strong>Note:</strong> This setting is only used during printing and does not affect parsing. Parsing currently only works for inputs with '\n', '\r' and
@@ -2762,7 +2779,7 @@ public CSVFormat withRecordSeparator(final String recordSeparator) {
2762
2779
}
2763
2780
2764
2781
/**
2765
-
* Returns a new {@code CSVFormat} with skipping the header record set to {@code true}.
2782
+
* Builds a new {@code CSVFormat} with skipping the header record set to {@code true}.
2766
2783
*
2767
2784
* @return A new CSVFormat that is equal to this but with the specified skipHeaderRecord setting.
2768
2785
* @see Builder#setSkipHeaderRecord(boolean)
@@ -2776,7 +2793,7 @@ public CSVFormat withSkipHeaderRecord() {
2776
2793
}
2777
2794
2778
2795
/**
2779
-
* Returns a new {@code CSVFormat} with whether to skip the header record.
2796
+
* Builds a new {@code CSVFormat} with whether to skip the header record.
2780
2797
*
2781
2798
* @param skipHeaderRecord whether to skip the header record.
2782
2799
* @return A new CSVFormat that is equal to this but with the specified skipHeaderRecord setting.
@@ -2789,7 +2806,7 @@ public CSVFormat withSkipHeaderRecord(final boolean skipHeaderRecord) {
2789
2806
}
2790
2807
2791
2808
/**
2792
-
* Returns a new {@code CSVFormat} with the record separator of the format set to the operating system's line separator string, typically CR+LF on Windows
2809
+
* Builds a new {@code CSVFormat} with the record separator of the format set to the operating system's line separator string, typically CR+LF on Windows
2793
2810
* and LF on Linux.
2794
2811
*
2795
2812
* <p>
@@ -2807,7 +2824,7 @@ public CSVFormat withSystemRecordSeparator() {
2807
2824
}
2808
2825
2809
2826
/**
2810
-
* Returns a new {@code CSVFormat} to add a trailing delimiter.
2827
+
* Builds a new {@code CSVFormat} to add a trailing delimiter.
2811
2828
*
2812
2829
* @return A new CSVFormat that is equal to this but with the trailing delimiter setting.
2813
2830
* @since 1.3
@@ -2819,7 +2836,7 @@ public CSVFormat withTrailingDelimiter() {
2819
2836
}
2820
2837
2821
2838
/**
2822
-
* Returns a new {@code CSVFormat} with whether to add a trailing delimiter.
2839
+
* Builds a new {@code CSVFormat} with whether to add a trailing delimiter.
2823
2840
*
2824
2841
* @param trailingDelimiter whether to add a trailing delimiter.
2825
2842
* @return A new CSVFormat that is equal to this but with the specified trailing delimiter setting.
@@ -2832,7 +2849,7 @@ public CSVFormat withTrailingDelimiter(final boolean trailingDelimiter) {
2832
2849
}
2833
2850
2834
2851
/**
2835
-
* Returns a new {@code CSVFormat} to trim leading and trailing blanks. See {@link #getTrim()} for details of where this is used.
2852
+
* Builds a new {@code CSVFormat} to trim leading and trailing blanks. See {@link #getTrim()} for details of where this is used.
2836
2853
*
2837
2854
* @return A new CSVFormat that is equal to this but with the trim setting on.
2838
2855
* @since 1.3
@@ -2844,7 +2861,7 @@ public CSVFormat withTrim() {
2844
2861
}
2845
2862
2846
2863
/**
2847
-
* Returns a new {@code CSVFormat} with whether to trim leading and trailing blanks. See {@link #getTrim()} for details of where this is used.
2864
+
* Builds a new {@code CSVFormat} with whether to trim leading and trailing blanks. See {@link #getTrim()} for details of where this is used.
2848
2865
*
2849
2866
* @param trim whether to trim leading and trailing blanks.
2850
2867
* @return A new CSVFormat that is equal to this but with the specified trim setting.
0 commit comments