P15GEN2\59518
2025-10-10 9f6890646993d16260d4201d613c092132856127
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
package foundation.io.object;
 
import foundation.util.Util;
 
public class Header {
 
    private String title;
    private int index;
    private String fieldName;
    private String format;
    
    public Header(int index, String title, String fieldName) {
        this.title = title;
        this.index = index;
        parseFieldName(fieldName);
    }
 
    private String parseFieldName(String value) {
        if (Util.isEmpty(value)) {
            return null;
        }
        
        value = value.trim();
        
        if (!value.startsWith("{")) {
            return null;
        }
        
        int fieldEndPos = value.indexOf("}");
        this.fieldName = value.substring(1, fieldEndPos);
        this.format = value.substring(fieldEndPos + 1);
        
        return value;
    }
 
    public String getTitle() {
        return title;
    }
 
    public void setTitle(String title) {
        this.title = title;
    }
    
    public int getIndex() {
        return index;
    }
 
    public void setIndex(int index) {
        this.index = index;
    }
 
    public String getFieldName() {
        return fieldName;
    }
 
    public void setFieldName(String fieldName) {
        this.fieldName = fieldName;
    }
 
    public String getFormat() {
        return format;
    }
    
}