本文整理汇总了Java中org.supercsv.cellprocessor.FmtBool类的典型用法代码示例。如果您正苦于以下问题:Java FmtBool类的具体用法?Java FmtBool怎么用?Java FmtBool使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FmtBool类属于org.supercsv.cellprocessor包,在下文中一共展示了FmtBool类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getProcessors
import org.supercsv.cellprocessor.FmtBool; //导入依赖的package包/类
/**
* Sets up the processors used for the examples. There are 10 CSV columns, so 10 processors are defined. All values
* are converted to Strings before writing (there's no need to convert them), and null values will be written as
* empty columns (no need to convert them to "").
*
* @return the cell processors
*/
private static CellProcessor[] getProcessors() {
final CellProcessor[] processors = new CellProcessor[] { new UniqueHashCode(), // customerNo (must be unique)
new NotNull(), // firstName
new NotNull(), // lastName
new FmtDate("dd/MM/yyyy"), // birthDate
new NotNull(), // mailingAddress
new Optional(new FmtBool("Y", "N")), // married
new Optional(), // numberOfKids
new NotNull(), // favouriteQuote
new NotNull(), // email
new LMinMax(0L, LMinMax.MAX_LONG) // loyaltyPoints
};
return processors;
}