我可以告诉supercsv该类具有is方法而不是getter吗?
public class Decision {
private boolean isAccepcted;
public boolean isAccepcted() {
return isAccepcted;
}
public boolean getIsAccepted() {
return isAccepcted;
}
}
这是该类尝试读取值的部分。
private static final String[] NAME_MAPPING = new String[]{
"isAccepcted"
};
private static final CellProcessor[] PROCESSORS = new CellProcessor[] {
new org.supercsv.cellprocessor.ConvertNullTo(DEFAULT_NULL_VALUE)
};
private final CsvBeanWriter csvWriter;
csvWriter.write(consent, NAME_MAPPING, PROCESSORS);
没有getIsAccepted方法,lib将找不到该方法。
有什么主意我只能打电话给isAccepted吗?
非常感谢, 马库斯