The list of methods to do Properties Get are organized into topic(s).
void
clearPrefixedSystemProperties(String prefix, Map targetPropertyMap) clearPrefixedSystemProperties clears System Properties by writing null properties in the targetPropertyMap that match a prefix
for (Object o : System.getProperties().keySet()) {
String propertyName = (String) o;
if (propertyName.startsWith(prefix) && !targetPropertyMap.containsKey(propertyName)) {
targetPropertyMap.put(propertyName, null);
void
copyProperties(Hashtable src, Hashtable target) This API copies the properties from src hashtable to the target hashtable
Enumeration keys = src.keys();
while (keys.hasMoreElements()) {
Object key = keys.nextElement();
Object value = src.get(key);
target.put(key, value);
int
getInt(Properties props, String name) get Int
if (props.containsKey(name)) {
return getInt(props, name, -1);
throw new IllegalArgumentException("Missing required property '" + name + "'");
Map
getIntersectionOfPropertyValues(Properties propertyFileOne, Properties propertyFileTwo)
get Intersection Of Property Values
Map<String, String> intersection = new HashMap<String, String>();
for (String key : propertyFileOne.stringPropertyNames()) {
String propertyOneValue = propertyFileOne.getProperty(key);
String propertyTwoValue = propertyFileTwo.getProperty(key);
if (propertyOneValue != null && propertyTwoValue != null && propertyOneValue.equals(propertyTwoValue)) {
intersection.put(key, propertyOneValue);
return intersection;
boolean
getIsB37PropertyValue(final Properties dataSourceProperties) Get if the properties has specified the `isB37` field #CONFIG_FILE_FIELD_NAME_IS_B37_DATA_SOURCE as true.
if (dataSourceProperties.containsKey(CONFIG_FILE_FIELD_NAME_IS_B37_DATA_SOURCE)) {
return Boolean.valueOf(
dataSourceProperties.getProperty(CONFIG_FILE_FIELD_NAME_IS_B37_DATA_SOURCE).replace(" ", ""));
return false;