Index: references/pom.xml
===================================================================
--- references/pom.xml	(revision 26)
+++ references/pom.xml	(revision 27)
@@ -6,5 +6,5 @@
 	<groupId>geniusweb</groupId>
 	<artifactId>references</artifactId>
-	<version>1.5.5</version> <!-- must equal ${geniusweb.version} -->
+	<version>1.5.6</version> <!-- must equal ${geniusweb.version} -->
 	<packaging>jar</packaging>
 
@@ -17,5 +17,5 @@
 		<passwd>${env.ARTIFACTORY_PASS}</passwd>
 		<jackson-2-version>2.9.10</jackson-2-version>
-		<geniusweb.version>1.5.5</geniusweb.version>
+		<geniusweb.version>1.5.6</geniusweb.version>
 	</properties>
 
Index: references/src/main/java/geniusweb/references/Parameters.java
===================================================================
--- references/src/main/java/geniusweb/references/Parameters.java	(revision 26)
+++ references/src/main/java/geniusweb/references/Parameters.java	(revision 27)
@@ -22,9 +22,31 @@
 	@SuppressWarnings("unchecked")
 	public <T> T get(String paramname, Class<T> classType) {
-		if (!containsKey(paramname)
-				|| !(get(paramname).getClass().isInstance(classType)))
-			throw new IllegalArgumentException(" Missing contain a parameter "
+		if (!containsKey(paramname) || !(classType.isInstance(get(paramname))))
+			throw new IllegalArgumentException(" Missing a parameter "
 					+ paramname + " with a " + classType.getName() + " value");
 		return (T) get(paramname);
 	}
+
+	/**
+	 * 
+	 * @param name       the parameter name
+	 * @param defaultval the default value to return if parameter is not
+	 *                   available or not inside the given range. Can be null
+	 * @param min        the minimum value, or null if not applicable
+	 * @param max        the maximum value, or null if not applicable
+	 * @return the double value contained inside the parameter with the given
+	 *         name, or defaultval if the parameter does not exist, does not
+	 *         contain a double, or is outside [min, max].
+	 */
+	public Double getDouble(String name, Double defaultval, Double min,
+			Double max) {
+		if (!containsKey(name) || !(get(name) instanceof Double))
+			return defaultval;
+		Double val = (Double) get(name);
+		if (min != null && val < min)
+			return defaultval;
+		if (max != null && val > max)
+			return defaultval;
+		return val;
+	}
 }
Index: references/src/test/java/geniusweb/references/ParametersTest.java
===================================================================
--- references/src/test/java/geniusweb/references/ParametersTest.java	(revision 27)
+++ references/src/test/java/geniusweb/references/ParametersTest.java	(revision 27)
@@ -0,0 +1,69 @@
+package geniusweb.references;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import tudelft.utilities.junit.GeneralTests;
+
+public class ParametersTest extends GeneralTests<Parameters> {
+
+	private final Parameters params1 = new Parameters();
+	private final Parameters params1a = new Parameters();
+	private final Parameters params2 = new Parameters();
+
+	@Before
+	public void before() {
+		params2.put("a", 1);
+		params2.put("b", 2d);
+	}
+
+	@Override
+	public List<List<Parameters>> getGeneralTestData() {
+		return Arrays.asList(Arrays.asList(params1, params1a),
+				Arrays.asList(params2));
+	}
+
+	@Override
+	public List<String> getGeneralTestStrings() {
+		return Arrays.asList("\\{\\}", "\\{a=1, b=2.0\\}");
+	}
+
+	@Test(expected = IllegalArgumentException.class)
+	public void getWrongClass() {
+		params2.get("a", String.class);
+	}
+
+	@Test
+	public void getInteger() {
+		assertEquals((Integer) 1, params2.get("a", Integer.class));
+		assertEquals((Double) 2d, params2.get("b", Double.class));
+	}
+
+	@Test
+	public void getDouble() {
+		assertEquals((Double) 2d, params2.getDouble("b", 7d, null, null));
+		assertEquals((Double) 2d, params2.getDouble("b", 7d, 0d, 4d));
+
+		// test outside range
+		assertEquals((Double) 7d, params2.getDouble("b", 7d, 4d, 6d));
+		assertEquals((Double) 7d, params2.getDouble("b", 7d, -2d, 1d));
+
+		// test fallback null
+		assertEquals(null, params2.getDouble("b", null, 4d, 6d));
+
+	}
+
+	@Test
+	public void getDoubleWithErrors() {
+		// a does not contain a double
+		assertEquals((Double) 7d, params2.getDouble("a", 7d, 4d, 6d));
+		// c does not exist
+		assertEquals((Double) 7d, params2.getDouble("c", 7d, 4d, 6d));
+
+	}
+}
