public String getString(String key, String defaultValue) throws SyntaxException { String value = getSimple(key); return value != null ? value : defaultValue; }
public String getString(String key, String defaultValue) throws SyntaxException { String value = getSimple(key); return value != null ? value : defaultValue; }
public String getString(String key, String defaultValue) throws SyntaxException { String value = getSimple(key); return value != null ? value : defaultValue; }
public String getString(String key, String defaultValue) throws SyntaxException { String value = getSimple(key); return value != null ? value : defaultValue; }
public Boolean getBoolean(String key, Boolean defaultValue) throws SyntaxException { String value = getSimple(key); return (value == null) ? defaultValue : value.toLowerCase().matches("(1|true|yes)"); }
public Boolean getBoolean(String key, Boolean defaultValue) throws SyntaxException { String value = getSimple(key); return (value == null) ? defaultValue : PATTERN_POSITIVE.matcher(value.toLowerCase()).matches(); }
public Boolean getBoolean(String key, Boolean defaultValue) throws SyntaxException { String value = getSimple(key); return (value == null) ? defaultValue : PATTERN_POSITIVE.matcher(value.toLowerCase()).matches(); }
public Boolean getBoolean(String key, Boolean defaultValue) throws SyntaxException { String value = getSimple(key); return (value == null) ? defaultValue : PATTERN_POSITIVE.matcher(value.toLowerCase()).matches(); }
public Integer getInt(String key, Integer defaultValue) throws SyntaxException { String value = getSimple(key); return toInt(key, value, defaultValue); }
public Integer getInt(String key, Integer defaultValue) throws SyntaxException { String value = getSimple(key); return toInt(key, value, defaultValue); }
public Integer getInt(String key, Integer defaultValue) throws SyntaxException { String value = getSimple(key); return toInt(key, value, defaultValue); }
public Integer getInt(String key, Integer defaultValue) throws SyntaxException { String value = getSimple(key); return toInt(key, value, defaultValue); }
public double getDouble(String key, double defaultValue) throws SyntaxException { String value = getSimple(key); if (value == null) { return defaultValue; } else { try { return Double.parseDouble(value); } catch (NumberFormatException e) { throw new SyntaxException(String.format("Invalid double value %s for '%s'", value, key)); } } }
public double getDouble(String key, double defaultValue) throws SyntaxException { String value = getSimple(key); if (value == null) { return defaultValue; } else { try { return Double.parseDouble(value); } catch (NumberFormatException e) { throw new SyntaxException(String.format("Invalid double value %s for '%s'", value, key)); } } }
public Double getDouble(String key, Double defaultValue) throws SyntaxException { String value = getSimple(key); if (value == null) { return defaultValue; } else { try { return Double.valueOf(value); } catch (NumberFormatException e) { throw new SyntaxException(String.format("Invalid double value %s for '%s'", value, key)); } } }
public double getDouble(String key, double defaultValue) throws SyntaxException { String value = getSimple(key); if (value == null) { return defaultValue; } else { try { return Double.parseDouble(value); } catch (NumberFormatException e) { throw new SyntaxException(String.format("Invalid double value %s for '%s'", value, key)); } } }