本文整理匯總了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;
}