public Object getPropertyValue(String propertyValue, Attribute.Type attributeType) {
        switch (attributeType) {
            case BOOL:
                return Boolean.parseBoolean(propertyValue);
            case DOUBLE:
                return Double.parseDouble(propertyValue);
            case FLOAT:
                return Float.parseFloat(propertyValue);
            case INT:
                return Integer.parseInt(propertyValue);
            case LONG:
                return Long.parseLong(propertyValue);
            case STRING:
                return propertyValue;
            case OBJECT:
                return propertyValue;
            default:
                throw new SiddhiAppRuntimeException("No supported mapping for '" + propertyValue +
                        "' with class '" + propertyValue.getClass().getName() + "' to attribute type '" +
                        attributeType + "'.");
        }
    }
Convert the given object to the given type.

@param propertyValue the actual object
@param attributeType the desired data type
@return the converted object
modules/siddhi-core/src/main/java/io/siddhi/core/util/AttributeConverter.java