416417418419420421422423424
public void derive(Builder builder) { for(int i = path.size() - 1; i >= 0; i--) { String node = path.get(i); Config c = manager.getConfig(node); c.derive(builder); } }
4950515253545556
public Config getConfig(String domain) { if( domain == null ) throw new NullPointerException("specified domain is null."); Config result = configs.get(domain); return result == null ? EmptyConfig.INSTANCE : result; }
979899100101102103104105106107
if( domain == null ) throw new NullPointerException("cannot fire update event for null domain."); synchronized (this) { Config config = getConfig(domain); for(Configurable configurable : getDomainConfigurables(domain)) configurable.updateConfig(config); } }
164165166167168169170171172173174
@Override public boolean hasValue(String key) { for(String node : path) { Config c = manager.getConfig(node); if( c.hasValue(key) ) return true; } return false; }
176177178179180181182183184185186
@Override public String getString(String key, String val) { for(String node : path) { Config c = manager.getConfig(node); if( c.hasValue(key) ) return c.getString(key, val); } return val; }
194195196197198199200201202203204
@Override public boolean getBoolean(String key, boolean val) { for(String node : path) { Config c = manager.getConfig(node); if( c.hasValue(key) ) return c.getBoolean(key, val); } return val; }
212213214215216217218219220221222
@Override public char getChar(String key, char val) { for(String node : path) { Config c = manager.getConfig(node); if( c.hasValue(key) ) return c.getChar(key, val); } return val; }
230231232233234235236237238239240
@Override public int getInt(String key, int val) { for(String node : path) { Config c = manager.getConfig(node); if( c.hasValue(key) ) return c.getInt(key, val); } return val; }