public Short getShort(String key, Short defaultValue) { String value = getProperty(key); if (value == null) { return defaultValue; } else { try { return PropertyConverter.toShort(interpolate(value)); } catch (ConversionException e) { throw new ConversionException('\'' + key + "' doesn't map to a Short object", e); } } }
public Double getDouble(String key, Double defaultValue) { String value = getProperty(key); if (value == null) { return defaultValue; } else { try { return PropertyConverter.toDouble(interpolate(value)); } catch (ConversionException e) { throw new ConversionException('\'' + key + "' doesn't map to a Double object", e); } } }
public Integer getInteger(String key, Integer defaultValue) { String value = getProperty(key); if (value == null) { return defaultValue; } else { try { return PropertyConverter.toInteger(interpolate(value)); } catch (ConversionException e) { throw new ConversionException('\'' + key + "' doesn't map to an Integer object", e); } } }
public Boolean getBoolean(String key, Boolean defaultValue) { String value = getProperty(key); if (value == null) { return defaultValue; } else { try { return PropertyConverter.toBoolean(interpolate(value)); } catch (ConversionException e) { throw new ConversionException('\'' + key + "' doesn't map to a Boolean object", e); } } }