Code example for Properties

Methods: containsKey, getProperty

0
	ConfigurationManager() throws IOException { 
		this("settings.conf"); 
	} 
 
	public String getKey(String key) throws NoSuchElementException {
		if (properties.containsKey(key)) {
			return properties.getProperty(key);
		} else { 
			throw new NoSuchElementException();
		} 
	} 
	 
	/** 
	 * Checks that the key is true. If it is, returns 
	 * true. Otherwise returns false. If the key doesn't 
	 * exist, returns false. 
	 */ 
	public boolean isTrue(String key) {
		try { 
			return Boolean.parseBoolean(getKey(key));
		} catch (NoSuchElementException e) {