@Test public void get() { 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 localFile = new PropFile(Context.named("test"), PropFile.Loc.Local); localFile.add("test", "local-value"); PropFile adHocFile = new PropFile(Context.named("test"), PropFile.Loc.AdHoc); adHocFile.add("test", "adhoc-value"); chain.set(systemFile, PropFile.Loc.System); PropFile.Prop systemProp = chain.get("test"); assertNotSame(empty, systemProp); assertEquals("system-value", systemProp.value()); chain.set(localFile, PropFile.Loc.Local); PropFile.Prop localProp = chain.get("test"); assertNotSame(systemProp, localProp); assertEquals("local-value", localProp.value()); chain.set(adHocFile, PropFile.Loc.AdHoc); PropFile.Prop adhocProp = chain.get("test"); assertNotSame(localProp, adhocProp); assertEquals("adhoc-value", adhocProp.value()); }
public PropFile.Prop get(String named) { return delegate.get(named); }
PropFileChain { public PropFile.Prop get(String named) { return delegate.get(named); } }
PropFileChain { public PropFile.Prop get(String named) { return delegate.get(named); } PropFileChain(Map<Context, PropFileChain> filterConsultant);   PropFileChain(PropFileChain defaultChain, Map<Context, PropFileChain> filterConsultant); private  PropFileChain(Impl defaultChain, Map<Context, PropFileChain> filterConsultant); }
PropFileChain { public PropFile.Prop get(String named) { return delegate.get(named); } 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 { public PropFile.Prop get(String named) { return delegate.get(named); } 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();  }