class SimpleConverter implements Converter {

    @Override
    public <T> T convert(Object source, Class<T> targetType) {
        if (source == null) {
            return null;
        }

        if (targetType == Boolean.class || targetType == Boolean.TYPE) {
            @SuppressWarnings("unchecked")
            T t = (T) Boolean.valueOf(source.toString());
            return t;
        }

        @SuppressWarnings("unchecked")
        T t = (T) parse(source.toString(), targetType);
        return t;
    }

}