1

can I tell supercsv that the class has an is method instead of a getter?

public class Decision {
    private boolean isAccepcted;

    public boolean isAccepcted() {
         return isAccepcted;
    }

    public boolean getIsAccepted() {
         return isAccepcted;
    }
}

Here a part as the class tried to read the values.

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);

With out the method getIsAccepted the lib won't find the method.

Any idea how I can call only isAccepted?

Thanks a lot, Markus

BB-8
  • 45
  • 4

0 Answers0