package foundation.io.object; import foundation.util.Util; public class Header { private String title; private int index; private String fieldName; public Header(int index, String title, String fieldName) { this.title = title; this.index = index; this.fieldName = parseFieldName(fieldName); } private String parseFieldName(String value) { if (Util.isEmpty(value)) { return null; } value = value.trim(); if (!value.startsWith("{")) { return null; } value = value.substring(1, value.length() - 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; } }