@Test public void set() { PropFileChain chain = new PropFileChain(Collections.<Context, PropFileChain>emptyMap()); PropFile.Prop empty = chain.get("test"); assertSame(PropFile.Prop.Empty, empty); PropFile systemFile = new PropFile(Context.named("test"), PropFile.Loc.System); systemFile.add("test", "system-value"); PropFile overriddenSystemFile = new PropFile(Context.named("test"), PropFile.Loc.System); overriddenSystemFile.add("test", "overridden-system-value"); chain.set(systemFile, PropFile.Loc.System); PropFile.Prop systemProp = chain.get("test"); assertNotSame(empty, systemProp); assertEquals("system-value", systemProp.value()); chain.set(overriddenSystemFile, PropFile.Loc.System); PropFile.Prop localProp = chain.get("test"); assertNotSame(systemProp, localProp); assertEquals("overridden-system-value", localProp.value()); }
void set(PropFile propFile, PropFile.Loc at) { if ((propFile == null) || (at == null)) { throw new NullPointerException("PropFile and PropFile.Loc must not be null."); } delegate.set(propFile, at); }
PropFileChain { void set(PropFile propFile, PropFile.Loc at) { if ((propFile == null) || (at == null)) { throw new NullPointerException("PropFile and PropFile.Loc must not be null."); } delegate.set(propFile, at); } }
PropFileChain { void set(PropFile propFile, PropFile.Loc at) { if ((propFile == null) || (at == null)) { throw new NullPointerException("PropFile and PropFile.Loc must not be null."); } delegate.set(propFile, at); } PropFileChain(Map<Context, PropFileChain> filterConsultant);   PropFileChain(PropFileChain defaultChain, Map<Context, PropFileChain> filterConsultant); private  PropFileChain(Impl defaultChain, Map<Context, PropFileChain> filterConsultant); }
PropFileChain { void set(PropFile propFile, PropFile.Loc at) { if ((propFile == null) || (at == null)) { throw new NullPointerException("PropFile and PropFile.Loc must not be null."); } delegate.set(propFile, at); } PropFileChain(Map<Context, PropFileChain> filterConsultant);   PropFileChain(PropFileChain defaultChain, Map<Context, PropFileChain> filterConsultant); private  PropFileChain(Impl defaultChain, Map<Context, PropFileChain> filterConsultant); PropFile.Prop get(String named); final Iterable<PropFile.Prop> props(); }
PropFileChain { void set(PropFile propFile, PropFile.Loc at) { if ((propFile == null) || (at == null)) { throw new NullPointerException("PropFile and PropFile.Loc must not be null."); } delegate.set(propFile, at); } PropFileChain(Map<Context, PropFileChain> filterConsultant);   PropFileChain(PropFileChain defaultChain, Map<Context, PropFileChain> filterConsultant); private  PropFileChain(Impl defaultChain, Map<Context, PropFileChain> filterConsultant); PropFile.Prop get(String named); final Iterable<PropFile.Prop> props();  }