1 package com.github.mygreen.supercsv.exception;
2
3 import org.supercsv.exception.SuperCsvException;
4 import org.supercsv.util.CsvContext;
5
6
7
8
9
10
11
12
13
14 public class SuperCsvNoMatchHeaderException extends SuperCsvException {
15
16
17 private static final long serialVersionUID = 1L;
18
19 protected final String[] actualHeaders;
20
21 protected final String[] expectedHeaders;
22
23 public SuperCsvNoMatchHeaderException(final String[] actualHeaders, final String[] expectedHeaders, final CsvContext context) {
24 super(String.format("'%s' is not equals to '%s'",
25 String.join(",", actualHeaders), String.join(",", expectedHeaders)), context);
26
27 this.actualHeaders = actualHeaders;
28 this.expectedHeaders = expectedHeaders;
29 }
30
31 public String[] getActualHeaders() {
32 return actualHeaders;
33 }
34
35 public String[] getExpectedHeaders() {
36 return expectedHeaders;
37 }
38
39 }