class DomainParameterParser {

    public static Object createValueInstance(final String type, final String valueString) {
        final String upperCaseType = type.toUpperCase();
        final Object value;
        if (StringTypes.STRING.typeString.equals(upperCaseType)) {
            value = valueString;
        } else if (StringTypes.LONG.typeString.equals(upperCaseType)) {
            value = Long.parseLong(valueString);
        } else if (StringTypes.DOUBLE.typeString.equals(upperCaseType)) {
            value = Double.parseDouble(valueString);
        } else if (StringTypes.DATE.typeString.equals(upperCaseType)) {
            value = parseDate(valueString);
        } else {
            throw new SpringBatchLightminApplicationException("Unknown parameter Type: " + type);
        }
        return value;
    }

    private  DomainParameterParser();

}