public final void set(String propertyName, Object propertyValue) {
if (propertyValue instanceof String) {
setProperty(propertyName, Type.STRING, propertyValue);
} else if (propertyValue instanceof Double) {
setProperty(propertyName, Type.DOUBLE, propertyValue);
} else if (propertyValue instanceof Long) {
setProperty(propertyName, Type.LONG, propertyValue);
} else if (propertyValue instanceof Float) {
setProperty(propertyName, Type.DOUBLE, (double) ((Float) propertyValue));
} else if (propertyValue instanceof Integer) {
setProperty(propertyName, Type.INT, propertyValue);
} else if (propertyValue instanceof Boolean) {
setProperty(propertyName, Type.BOOL, propertyValue);
} else if (propertyValue instanceof int[]) {
setProperty(propertyName, Type.INT_ARRAY, propertyValue);
} else if (propertyValue instanceof double[]) {
setProperty(propertyName, Type.DOUBLE_ARRAY, propertyValue);
} else if (propertyValue instanceof long[]) {
setProperty(propertyName, Type.LONG_ARRAY, propertyValue);
} else {
throw new RuntimeException("Invalid property type: " + propertyValue + ", please use a Type listed in org.mwg.Type");