Initial Commit

This commit is contained in:
Isaac Parenteau
2019-07-20 12:39:03 -05:00
commit 79529ecc40
66 changed files with 6549 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
package net.locusworks.common.properties;
import java.util.Properties;
public class ImmutableProperties extends Properties {
private static final long serialVersionUID = 65942088008978137L;
public ImmutableProperties() {
super();
}
public ImmutableProperties(Properties props) {
super();
if (props == null || props.isEmpty()) return;
props.entrySet().forEach(item -> this.put(item.getKey(), item.getValue()));
}
@Override
public synchronized Object setProperty(String key, String value) {
return put(key, value);
}
public synchronized Object put(Object key, Object value) {
if (containsKey(key))
throw new RuntimeException("Cannot change key value once its set: " + key);
return super.put(key, value);
}
}

File diff suppressed because it is too large Load Diff