app.knock.api.model.util.PropertyBuilderHelper Maven / Gradle / Ivy
package app.knock.api.model.util;
import java.util.Map;
public abstract class PropertyBuilderHelper {
public static T setProperty(Map map, String key, Class clazz) {
if (map != null && map.containsKey(key)) {
Object o = map.get(key);
return clazz.isInstance(o) ? clazz.cast(o) : null;
}
return null;
}
}