@Test @DisplayName("It proxies multiple maps and earlier hides the later") void testFromMapMultiple() { final var sut = new CompoundParams("theId", JVM8Tools.asMap("a", "1", "b", "2"), JVM8Tools.asMap("a", "4", "b", "4", "c", "5")); Assertions.assertEquals("theId", sut.get("id")); Assertions.assertEquals("1", sut.get("a")); Assertions.assertEquals("2", sut.get("b")); Assertions.assertEquals("5", sut.get("c")); Assertions.assertEquals("", sut.get("nonexsistent")); }
@Override public String get(String key, String defaults) { return Optional.ofNullable(get0(key)).orElse(defaults); }
CompoundParams implements javax0.geci.api.CompoundParams { @Override public String get(String key, String defaults) { return Optional.ofNullable(get0(key)).orElse(defaults); } }
CompoundParams implements javax0.geci.api.CompoundParams { @Override public String get(String key, String defaults) { return Optional.ofNullable(get0(key)).orElse(defaults); } @SafeVarargs  CompoundParams(String id, Map<String, ?>... params);  CompoundParams(CompoundParams... cparams); }
CompoundParams implements javax0.geci.api.CompoundParams { @Override public String get(String key, String defaults) { return Optional.ofNullable(get0(key)).orElse(defaults); } @SafeVarargs  CompoundParams(String id, Map<String, ?>... params);  CompoundParams(CompoundParams... cparams); void trace(); @Override void setConstraints(Source source, String mnemonic, Set<String> allowedKeys); @Override String get(String key, String defaults); @Override String get(String key, Supplier<String> defaultSupplier); @Override String get(String key); @Override String id(String mnemonic); @Override List<String> getValueList(String key, List<String> defaults); @Override List<String> getValueList(String key); @Override boolean is(String key); @Override boolean is(String key, boolean defaultValue); @Override boolean is(String key, String defaultValue); @Override Set<String> keySet(); @Override String toString(); }
CompoundParams implements javax0.geci.api.CompoundParams { @Override public String get(String key, String defaults) { return Optional.ofNullable(get0(key)).orElse(defaults); } @SafeVarargs  CompoundParams(String id, Map<String, ?>... params);  CompoundParams(CompoundParams... cparams); void trace(); @Override void setConstraints(Source source, String mnemonic, Set<String> allowedKeys); @Override String get(String key, String defaults); @Override String get(String key, Supplier<String> defaultSupplier); @Override String get(String key); @Override String id(String mnemonic); @Override List<String> getValueList(String key, List<String> defaults); @Override List<String> getValueList(String key); @Override boolean is(String key); @Override boolean is(String key, boolean defaultValue); @Override boolean is(String key, String defaultValue); @Override Set<String> keySet(); @Override String toString();  }