public static void main(String[] args) {
List<String> h1 = Arrays.asList("", "", "history orders", "period history orders changes");
List<String> h2 = Arrays.asList("", "", "history MYS orders by users", "history Card orders by users", "period history MYS orders increased user numbers ", "period history Card orders increased user numbers");
List<String> h3 = Arrays.asList("org_id", "org_name", "1 order users", "2 orders users ", "3 orders users", "over 3 orders users", "1 order users", "2 orders users ", "3 orders users", "over 3 orders users", "1 order users", "2 orders users ", "3 orders users", "over 3 orders users", "1 order users", "2 orders users ", "3 orders users", "over 3 orders users");
LinkedList<Character> h1Pos = new LinkedList<>(Arrays.asList('a', 'b', 'c', 'k'));
LinkedList<Character> h2Pos = new LinkedList<>(Arrays.asList('a', 'b', 'c', 'g', 'k', 'o'));
int i1=0;
int i2=0;
int i3=0;
for (char col='a'; col<='r' ; col++) {
if (h2Pos.size()>1&&h2Pos.get(1)==col) {
h2Pos.remove();
i2++;
}
if (h1Pos.size() > 1 && h1Pos.get(1) == col) {
h1Pos.remove();
i1++;
}
System.out.println("@ExcelProperty(value = {\""+h1.get(i1)+"\",\""+h2.get(i2)+"\",\""+h3.get(i3)+"\",},index = "+i3+")");
System.out.println("private Integer c_"+col+";");
i3++;
}
}
Reproduced in: https: //www.jianshu.com/p/2b7602416bbd