// Path: src/main/java/org/xdat/exceptions/CorruptDataException.java
// public class CorruptDataException extends RuntimeException {
// 
// 	public CorruptDataException(Parameter corruptParameter) {
// 		super("The data of parameter \"" + corruptParameter.getName() + "\" seems to be corrupt!");
// 	}
// 
// }


import org.xdat.exceptions.CorruptDataException;
import java.awt.FontMetrics;
import java.io.Serializable;
import java.util.Comparator;
import java.util.Iterator;
import java.util.Optional;
import java.util.TreeSet;
import java.util.stream.Collectors;
	 * @return the numeric representation of the given string
	 */
	double getDoubleValueOf(String string) {
		if (this.numeric) {
			Optional<Float> parsed = NumberParser.parseNumber(string);
			if(parsed.isPresent()) {
				return parsed.get();
			}
		}

		int index = 0;
		Iterator<String> it = discreteLevels.iterator();
		while (it.hasNext()) {
			if (string.equalsIgnoreCase(it.next())) {
				return index;
			}
			index++;
		}

		// String not found, add it to discrete levels
		this.discreteLevels.add(string);
		index = 0;
		it = discreteLevels.iterator();
		while (it.hasNext()) {
			String next = it.next();
			if (string.equalsIgnoreCase(next)) {
				return index;
			}
			index++;
		}
// Path: src/main/java/org/xdat/exceptions/CorruptDataException.java
// public class CorruptDataException extends RuntimeException {
// 
// 	public CorruptDataException(Parameter corruptParameter) {
// 		super("The data of parameter \"" + corruptParameter.getName() + "\" seems to be corrupt!");
// 	}
// 
// }


// Path: src/main/java/org/xdat/data/Parameter.java
import org.xdat.exceptions.CorruptDataException;
import java.awt.FontMetrics;
import java.io.Serializable;
import java.util.Comparator;
import java.util.Iterator;
import java.util.Optional;
import java.util.TreeSet;
import java.util.stream.Collectors;

	 * @return the numeric representation of the given string
	 */
	double getDoubleValueOf(String string) {
		if (this.numeric) {
			Optional<Float> parsed = NumberParser.parseNumber(string);
			if(parsed.isPresent()) {
				return parsed.get();
			}
		}

		int index = 0;
		Iterator<String> it = discreteLevels.iterator();
		while (it.hasNext()) {
			if (string.equalsIgnoreCase(it.next())) {
				return index;
			}
			index++;
		}

		// String not found, add it to discrete levels
		this.discreteLevels.add(string);
		index = 0;
		it = discreteLevels.iterator();
		while (it.hasNext()) {
			String next = it.next();
			if (string.equalsIgnoreCase(next)) {
				return index;
			}
			index++;
		}
		throw new CorruptDataException(this);