@Test public void testGetMethods() { Assert.assertEquals(props.getProperty("a"), "1"); Assert.assertEquals(props.get("b"), "2"); Assert.assertEquals(props.getProperty("c", "4"), "3"); Assert.assertEquals(props.getProperty("d", "default"), "default"); }
@Override public String getProperty(String key) { Object oval = this.get(key); String sval = (oval instanceof String) ? (String) oval : null; return ((sval == null) && (defaults != null)) ? defaults.getProperty(key) : sval; }
ImmutableProperties extends Properties { @Override public String getProperty(String key) { Object oval = this.get(key); String sval = (oval instanceof String) ? (String) oval : null; return ((sval == null) && (defaults != null)) ? defaults.getProperty(key) : sval; } }
ImmutableProperties extends Properties { @Override public String getProperty(String key) { Object oval = this.get(key); String sval = (oval instanceof String) ? (String) oval : null; return ((sval == null) && (defaults != null)) ? defaults.getProperty(key) : sval; } ImmutableProperties(Properties props); }
ImmutableProperties extends Properties { @Override public String getProperty(String key) { Object oval = this.get(key); String sval = (oval instanceof String) ? (String) oval : null; return ((sval == null) && (defaults != null)) ? defaults.getProperty(key) : sval; } ImmutableProperties(Properties props); @Override boolean equals(Object o); @Override int hashCode(); @Override String getProperty(String key); }
ImmutableProperties extends Properties { @Override public String getProperty(String key) { Object oval = this.get(key); String sval = (oval instanceof String) ? (String) oval : null; return ((sval == null) && (defaults != null)) ? defaults.getProperty(key) : sval; } ImmutableProperties(Properties props); @Override boolean equals(Object o); @Override int hashCode(); @Override String getProperty(String key);  }