public String getProperty(final String name, final String defaultValue) { final Object result = get(name); String property = result instanceof String ? (String) result : null; if (property == null && defaults != null) { property = defaults.getProperty(name); } if (property == null) { return defaultValue; } return property; }
public String getProperty(String name, String defaultValue) { Object result = get(name); String property = result instanceof String ? (String) result : null; if (property == null && defaults != null) { property = defaults.getProperty(name); } if (property == null) { return defaultValue; } return property; }
public String getProperty(final String name) { final Object result = get(name); String property = result instanceof String ? (String) result : null; if (property == null && defaults != null) { property = defaults.getProperty(name); } return property; }
public String getProperty(String name) { Object result = get(name); String property = result instanceof String ? (String) result : null; if (property == null && defaults != null) { property = defaults.getProperty(name); } return property; }
@Override public String getProperty(final String name) { final Object result = get(name); String property = STRING.isInstance(result) ? STRING.cast(result) : null; if (property == null && defaults != null) { property = defaults.getProperty(name); } return property; }
@Override public String getProperty(final String name, final String defaultValue) { final Object result = get(name); String property = STRING.isInstance(result) ? STRING.cast(result) : null; if (property == null && defaults != null) { property = defaults.getProperty(name); } if (property == null) { return defaultValue; } return property; }
private void appendProperty(final StringBuilder buffer, final Enumeration<?> keys) { final String key = keys.nextElement().toString(); buffer.append(key); buffer.append('='); String property = get(key).toString(); if (property == null) { property = defaults.getProperty(key); } if (property.length() > 40) { buffer.append(property.substring(0, 37)); buffer.append("..."); } else { buffer.append(property); } }
public void list(PrintStream out) { if (out == null) { throw new NullPointerException(); } StringBuffer buffer = new StringBuffer(80); Enumeration<?> keys = propertyNames(); while (keys.hasMoreElements()) { String key = (String) keys.nextElement(); buffer.append(key); buffer.append('='); String property = (String) get(key); if (property == null) { property = defaults.getProperty(key); } if (property.length() > 40) { buffer.append(property.substring(0, 37)); buffer.append("..."); } else { buffer.append(property); } out.println(buffer.toString()); buffer.setLength(0); } }
public void list(PrintWriter writer) { if (writer == null) { throw new NullPointerException(); } StringBuffer buffer = new StringBuffer(80); Enumeration<?> keys = propertyNames(); while (keys.hasMoreElements()) { String key = (String) keys.nextElement(); buffer.append(key); buffer.append('='); String property = (String) get(key); while (property == null) { property = defaults.getProperty(key); } if (property.length() > 40) { buffer.append(property.substring(0, 37)); buffer.append("..."); } else { buffer.append(property); } writer.println(buffer.toString()); buffer.setLength(0); } }
public void list(final PrintStream out) { if (out == null) { throw new NullPointerException(); } final StringBuilder buffer = new StringBuilder(80); final Enumeration<?> keys = propertyNames(); while (keys.hasMoreElements()) { final String key = (String) keys.nextElement(); buffer.append(key); buffer.append('='); String property = (String) get(key); if (property == null) { property = defaults.getProperty(key); } if (property.length() > 40) { buffer.append(property.substring(0, 37)); buffer.append("..."); } else { buffer.append(property); } out.println(buffer.toString()); buffer.setLength(0); } }
public void list(final PrintWriter writer) { if (writer == null) { throw new NullPointerException(); } final StringBuilder buffer = new StringBuilder(80); final Enumeration<?> keys = propertyNames(); while (keys.hasMoreElements()) { final String key = (String) keys.nextElement(); buffer.append(key); buffer.append('='); String property = (String) get(key); while (property == null) { property = defaults.getProperty(key); } if (property.length() > 40) { buffer.append(property.substring(0, 37)); buffer.append("..."); } else { buffer.append(property); } writer.println(buffer.toString()); buffer.setLength(0); } }