@Test public void testBlankPrefix() { Configuration configuration = new Configuration(); configuration.set("testkey", "testvalue"); PrefixContext context = new PrefixContext(configuration, ""); assertEquals("testvalue", context.getString("testkey")); }
@Override public String getString(String key) { return configuration.get(prefix + key); }
PrefixContext implements ImmutableContext { @Override public String getString(String key) { return configuration.get(prefix + key); } }
PrefixContext implements ImmutableContext { @Override public String getString(String key) { return configuration.get(prefix + key); } PrefixContext(Configuration configuration, String prefix); }
PrefixContext implements ImmutableContext { @Override public String getString(String key) { return configuration.get(prefix + key); } PrefixContext(Configuration configuration, String prefix); @Override String getString(String key); @Override String getString(String key, String defaultValue); @Override long getLong(String key, long defaultValue); @Override int getInt(String key, int defaultValue); @Override boolean getBoolean(String key, boolean defaultValue); Configuration getConfiguration(); @Override Iterator<Map.Entry<String, String>> iterator(); }
PrefixContext implements ImmutableContext { @Override public String getString(String key) { return configuration.get(prefix + key); } PrefixContext(Configuration configuration, String prefix); @Override String getString(String key); @Override String getString(String key, String defaultValue); @Override long getLong(String key, long defaultValue); @Override int getInt(String key, int defaultValue); @Override boolean getBoolean(String key, boolean defaultValue); Configuration getConfiguration(); @Override Iterator<Map.Entry<String, String>> iterator();  }