com.ch.utils.PropertyCache Maven / Gradle / Ivy
package com.ch.utils;
import com.ch.exception.PropertyNotFoundException;
public final class PropertyCache extends PropertyReader {
public static String getProperty(String key) throws PropertyNotFoundException {
if(properties.containsKey(key)) {
return PropertyReader.properties.getProperty(key);
} else {
throw new PropertyNotFoundException(" Property " + key + " not found");
}
}
public static Object getPropertyObject(String key) throws PropertyNotFoundException {
if(properties.containsKey(key)) {
return PropertyReader.properties.getProperty(key);
} else {
throw new PropertyNotFoundException(" Property " + key + " not found");
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy