// Path: src/main/java/com/siemens/oss/omniproperties/exceptions/PropertyNotFoundException.java
// public class PropertyNotFoundException extends RuntimeException {
// 
// 	private static final long serialVersionUID = 1L;
// 
// 	public PropertyNotFoundException(String arg0) {
// 		super(arg0);
// 	}
// 
// 	public PropertyNotFoundException(Throwable arg0) {
// 		super(arg0);
// 	}
// 
// 	public PropertyNotFoundException(String arg0, Throwable arg1) {
// 		super(arg0, arg1);
// 	}
// 
// 
// }
// 
// Path: src/main/java/com/siemens/oss/omniproperties/exceptions/WrongClassException.java
// public class WrongClassException extends RuntimeException {
// 
// 	private static final long serialVersionUID = 1L;
// 
// 	public WrongClassException(String arg0) {
// 		super(arg0);
// 	}
// 
// 	public WrongClassException(Throwable arg0) {
// 		super(arg0);
// 	}
// 
// 	public WrongClassException(String arg0, Throwable arg1) {
// 		super(arg0, arg1);
// 	}
// 
// }


import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.siemens.oss.omniproperties.exceptions.PropertyNotFoundException;
import com.siemens.oss.omniproperties.exceptions.WrongClassException;
		return getObject(key, Boolean.valueOf(def), Boolean.class).booleanValue();
	}



	/* (non-Javadoc)
	 * @see com.siemens.oss.omniproperties.IOmniProperties#getObject(java.lang.String, java.lang.Class)
	 */

	@Override
	public <T> T getObject(final String key, final Class<T> type) {
		final T result = getObject(key, null, type);
		if (result == null) {
			throw new PropertyNotFoundException("No property '" + key
					+ "' of type " + type.getSimpleName() + " found");
		}
		return result;
	}

	/* (non-Javadoc)
	 * @see com.siemens.oss.omniproperties.IOmniProperties#getObject(java.lang.String, T, java.lang.Class)
	 */
	@Override
	public <T> T getObject(final String key, final T def, final Class<T> type) {
		final Object value = map.get(key);
		if (value == null) {
			return def;
		} else if (type.isAssignableFrom(value.getClass())) {
			return type.cast(value);
		} else {
// Path: src/main/java/com/siemens/oss/omniproperties/exceptions/PropertyNotFoundException.java
// public class PropertyNotFoundException extends RuntimeException {
// 
// 	private static final long serialVersionUID = 1L;
// 
// 	public PropertyNotFoundException(String arg0) {
// 		super(arg0);
// 	}
// 
// 	public PropertyNotFoundException(Throwable arg0) {
// 		super(arg0);
// 	}
// 
// 	public PropertyNotFoundException(String arg0, Throwable arg1) {
// 		super(arg0, arg1);
// 	}
// 
// 
// }
// 
// Path: src/main/java/com/siemens/oss/omniproperties/exceptions/WrongClassException.java
// public class WrongClassException extends RuntimeException {
// 
// 	private static final long serialVersionUID = 1L;
// 
// 	public WrongClassException(String arg0) {
// 		super(arg0);
// 	}
// 
// 	public WrongClassException(Throwable arg0) {
// 		super(arg0);
// 	}
// 
// 	public WrongClassException(String arg0, Throwable arg1) {
// 		super(arg0, arg1);
// 	}
// 
// }


// Path: src/main/java/com/siemens/oss/omniproperties/MapOmniProperties.java
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.siemens.oss.omniproperties.exceptions.PropertyNotFoundException;
import com.siemens.oss.omniproperties.exceptions.WrongClassException;

		return getObject(key, Boolean.valueOf(def), Boolean.class).booleanValue();
	}



	/* (non-Javadoc)
	 * @see com.siemens.oss.omniproperties.IOmniProperties#getObject(java.lang.String, java.lang.Class)
	 */

	@Override
	public <T> T getObject(final String key, final Class<T> type) {
		final T result = getObject(key, null, type);
		if (result == null) {
			throw new PropertyNotFoundException("No property '" + key
					+ "' of type " + type.getSimpleName() + " found");
		}
		return result;
	}

	/* (non-Javadoc)
	 * @see com.siemens.oss.omniproperties.IOmniProperties#getObject(java.lang.String, T, java.lang.Class)
	 */
	@Override
	public <T> T getObject(final String key, final T def, final Class<T> type) {
		final Object value = map.get(key);
		if (value == null) {
			return def;
		} else if (type.isAssignableFrom(value.getClass())) {
			return type.cast(value);
		} else {
			throw new WrongClassException("Property '" + key