
com.fredericboisguerin.excel.converter.BooleanConverter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of excel-reader-writer Show documentation
Show all versions of excel-reader-writer Show documentation
A library to read/write excel files with simple descriptions of the model
package com.fredericboisguerin.excel.converter;
/**
* Created by fboisguerin on 22/07/2015.
*/
class BooleanConverter extends AbstractConverter {
private static final BooleanConverter INSTANCE = new BooleanConverter();
public static BooleanConverter getInstance() {
return INSTANCE;
}
private BooleanConverter() {
super(Boolean.class);
}
@Override
protected Boolean innerConvert(String s) {
String lower = s.toLowerCase();
if (lower.equals("x")
|| lower.equals("true")
|| lower.equals("t")
|| lower.equals("yes")
|| lower.equals("y")
|| lower.equals("vrai")
|| lower.equals("v")
|| lower.equals("oui")
|| lower.equals("o")) {
return true;
}
return false;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy