class BooleanConverter implements PropertyConverter<Boolean> {

    @Override
    public Boolean convert(String value, ConversionContext ctx) {
        ctx.addSupportedFormats(getClass(), "yes (ignore case)", "y (ignore case)",
                "true (ignore case)", "t (ignore case)", "1", "no (ignore case)", "n (ignore case)",
                "false (ignore case)", "f (ignore case)", "0");
        if(value==null){
            return null;
        }
        String ignoreCaseValue = value.trim()
                                        .toLowerCase(Locale.ENGLISH);
        switch(ignoreCaseValue) {
            case "1":
            case "yes":
            case "y":
            case "true":
            case "t":
            case "on":
                return Boolean.TRUE;
            case "no":
            case "n":
            case "false":
            case "f":
            case "0":
            case "off":
                return Boolean.FALSE;
            default:
                LOG.finest("Unknown boolean createValue encountered: " + value);
        }
        return null;
    }

}