0
删除十进制值我具有以下CellProcessor方法在supercsv
private static CellProcessor[] getProcessors() {
final CellProcessor[] processors = new CellProcessor[] {
new NotNull(), // senderId
new NotNull(), // orderId
new NotNull(), // execQuantity
new NotNull(), // execPrice <~~~~~~~~~~~~
new NotNull(new FmtDate("yyyy-MM-dd")), // deliveryDate
};
return processors;
}
作为execPrice是双,输出CSV文件包含十进制值。它必须是bean中的双重类型。编写csv文件时需要更改它。
如何删除supercsv中的十进制值(或转换为整数)?我认为我必须在CellProcessor中使用FmtNumber
,但我不知道如何。