io.tracee.configuration.PropertyChain Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tracee-core Show documentation
Show all versions of tracee-core Show documentation
Please refer to https://github.com/tracee/tracee.
package io.tracee.configuration;
import java.util.Arrays;
import java.util.Properties;
public class PropertyChain {
private final Iterable propertiesChain;
public PropertyChain(Iterable propertiesChain) {
this.propertiesChain = propertiesChain;
}
public static PropertyChain build(Properties... properties) {
return new PropertyChain(Arrays.asList(properties));
}
public String getProperty(String key) {
for (Properties properties : propertiesChain) {
final String p = properties.getProperty(key);
if (p != null)
return p;
}
return null;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy