// Path: implementations/java/OWAT-lib/src/main/java/com/ebp/owat/lib/datastructure/value/NodeMode.java
// public enum NodeMode {
// 	BIT(SerializationConstants.BIT_TYPE_STR, BitValue.class),BYTE(SerializationConstants.BYTE_TYPE_STR, ByteValue.class);
// 	
// 	public final String typeStr;
// 	public final Class<? extends Value> typeClass;
// 	
// 	NodeMode(String typeStr, Class<? extends Value> typeClass){
// 		this.typeStr = typeStr;
// 		this.typeClass = typeClass;
// 	}
// }
// 
// Path: implementations/java/OWAT-lib/src/main/java/com/ebp/owat/lib/runner/utils/MatrixMode.java
// public enum MatrixMode {
// 	HASHED("hashed"),
// 	LINKED("linked"),
// 	ARRAY("array");
// 
// 	public final String name;
// 
// 	MatrixMode(String name){
// 		this.name = name;
// 	}
// 
// 	/**
// 	 * Determines which matrix type to use based on the number of elements in the set to hold.
// 	 * @param n The number of elements to hold
// 	 * @return The matrix mode best to use.
// 	 */
// 	public static MatrixMode determineModeToUse(long n){
// 		return ARRAY;//allways the most efficient, https://github.com/Epic-Breakfast-Productions/OWAT/blob/master/implementations/java/Matrix%20Implementation%20Analysis/OWAT_Matrix_Implementation_Analysis.md
// 	}
// }
// 
// Path: implementations/java/OWAT-lib/src/main/java/com/ebp/owat/lib/runner/utils/ScrambleMode.java
// public enum ScrambleMode {
// 	SCRAMBLING("scrambling", 5),
// 	DESCRAMBLING("scrambling", 4);
// 
// 	/** The name of the mode */
// 	public final String name;
// 	/** The number of steps in the mode. */
// 	public final long numSteps;
// 
// 	ScrambleMode(String name, long numSteps){
// 		this.name = name;
// 		this.numSteps = numSteps;
// 	}
// }
// 
// Path: implementations/java/OWAT-lib/src/main/java/com/ebp/owat/lib/runner/utils/Step.java
// public enum Step {
// 	NOT_STARTED_SCRAMBLE(0, "Not Started", ScrambleMode.SCRAMBLING),
// 	NOT_STARTED_DESCRAMBLE(0, "Not Started", ScrambleMode.DESCRAMBLING),
// 
// 	LOAD_DATA(1, "Loading Data", ScrambleMode.SCRAMBLING),
// 	PAD_DATA(2, "Padding Data", ScrambleMode.SCRAMBLING),
// 	SCRAMBLING(3, "Scrambling", ScrambleMode.SCRAMBLING),
// 	OUT_SCRAMBLED_DATA(4, "Outputting Scrambled Data", ScrambleMode.SCRAMBLING),
// 	OUT_KEY(5, "Outputting key", ScrambleMode.SCRAMBLING),
// 	DONE_SCRAMBLING(6, "Done", ScrambleMode.SCRAMBLING),
// 	
// 	LOAD_KEY(1, "Loading Key", ScrambleMode.DESCRAMBLING),
// 	LOAD_SCRAMBLED_DATA(2, "Loading Scrambled Data", ScrambleMode.DESCRAMBLING),
// 	DESCRAMBLING(3, "Descrambling", ScrambleMode.DESCRAMBLING),
// 	OUT_DESCRAMBLED_DATA(4, "Outputting Descrambled Data", ScrambleMode.DESCRAMBLING),
// 	DONE_DESCRAMBLING(5, "Done", ScrambleMode.DESCRAMBLING);
// 
// 	/** The step number of the step. */
// 	public final int stepNo;
// 	/** The name of the step. */
// 	public final String stepName;
// 	/** The mode the step is part of. */
// 	public final ScrambleMode mode;
// 	
// 	Step(int stepNo, String name, ScrambleMode mode){
// 		this.stepNo = stepNo;
// 		this.stepName = name;
// 		this.mode = mode;
// 	}
// 
// 	/**
// 	 * Gets the steps that are part of a mode.
// 	 * @param mode The mode to get the steps of
// 	 * @return The list of steps in the mode.
// 	 */
// 	public static List<Step> getStepsIn(ScrambleMode mode){
// 		List<Step> steps = new LinkedList<>();
// 
// 		for(Step curStep : Step.values()){
// 			if(
// 				curStep == NOT_STARTED_SCRAMBLE ||
// 				curStep == NOT_STARTED_DESCRAMBLE ||
// 				curStep == DONE_DESCRAMBLING ||
// 				curStep == DONE_SCRAMBLING
// 			){
// 				continue;
// 			}
// 			if(curStep.mode == mode){
// 				steps.add(curStep);
// 			}
// 		}
// 		return steps;
// 	}
// }


import com.ebp.owat.lib.datastructure.value.NodeMode;
import com.ebp.owat.lib.runner.utils.MatrixMode;
import com.ebp.owat.lib.runner.utils.ScrambleMode;
import com.ebp.owat.lib.runner.utils.Step;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Collection;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
package com.ebp.owat.lib.runner.utils.results;



/**
 * Results of a run, keeps information about it for reporting.
 *
 * This is the abstract class to genericize data kept by both types of run (scrambling/descrambling)
 */
public abstract class RunResults {
	private static final Logger LOGGER = LoggerFactory.getLogger(RunResults.class);

	/**
	 * Constructor to set the scrambleMode of this scramble scrambleMode
	 * @param scrambleMode The scrambleMode of this run.
	 */
	public RunResults(ScrambleMode scrambleMode){
		this.scrambleMode = scrambleMode;
		if(this.scrambleMode == ScrambleMode.SCRAMBLING){
			this.curStep = Step.NOT_STARTED_SCRAMBLE;
		}
		if(this.scrambleMode == ScrambleMode.DESCRAMBLING){
			this.curStep = Step.NOT_STARTED_DESCRAMBLE;
		}
	}

	/**
	 * Constructor to setup the scramble and node modes.
	 * @param scrambleMode The scramble mode of this run.
	 * @param nodeMode The node mode of this run.
	 */
// Path: implementations/java/OWAT-lib/src/main/java/com/ebp/owat/lib/datastructure/value/NodeMode.java
// public enum NodeMode {
// 	BIT(SerializationConstants.BIT_TYPE_STR, BitValue.class),BYTE(SerializationConstants.BYTE_TYPE_STR, ByteValue.class);
// 	
// 	public final String typeStr;
// 	public final Class<? extends Value> typeClass;
// 	
// 	NodeMode(String typeStr, Class<? extends Value> typeClass){
// 		this.typeStr = typeStr;
// 		this.typeClass = typeClass;
// 	}
// }
// 
// Path: implementations/java/OWAT-lib/src/main/java/com/ebp/owat/lib/runner/utils/MatrixMode.java
// public enum MatrixMode {
// 	HASHED("hashed"),
// 	LINKED("linked"),
// 	ARRAY("array");
// 
// 	public final String name;
// 
// 	MatrixMode(String name){
// 		this.name = name;
// 	}
// 
// 	/**
// 	 * Determines which matrix type to use based on the number of elements in the set to hold.
// 	 * @param n The number of elements to hold
// 	 * @return The matrix mode best to use.
// 	 */
// 	public static MatrixMode determineModeToUse(long n){
// 		return ARRAY;//allways the most efficient, https://github.com/Epic-Breakfast-Productions/OWAT/blob/master/implementations/java/Matrix%20Implementation%20Analysis/OWAT_Matrix_Implementation_Analysis.md
// 	}
// }
// 
// Path: implementations/java/OWAT-lib/src/main/java/com/ebp/owat/lib/runner/utils/ScrambleMode.java
// public enum ScrambleMode {
// 	SCRAMBLING("scrambling", 5),
// 	DESCRAMBLING("scrambling", 4);
// 
// 	/** The name of the mode */
// 	public final String name;
// 	/** The number of steps in the mode. */
// 	public final long numSteps;
// 
// 	ScrambleMode(String name, long numSteps){
// 		this.name = name;
// 		this.numSteps = numSteps;
// 	}
// }
// 
// Path: implementations/java/OWAT-lib/src/main/java/com/ebp/owat/lib/runner/utils/Step.java
// public enum Step {
// 	NOT_STARTED_SCRAMBLE(0, "Not Started", ScrambleMode.SCRAMBLING),
// 	NOT_STARTED_DESCRAMBLE(0, "Not Started", ScrambleMode.DESCRAMBLING),
// 
// 	LOAD_DATA(1, "Loading Data", ScrambleMode.SCRAMBLING),
// 	PAD_DATA(2, "Padding Data", ScrambleMode.SCRAMBLING),
// 	SCRAMBLING(3, "Scrambling", ScrambleMode.SCRAMBLING),
// 	OUT_SCRAMBLED_DATA(4, "Outputting Scrambled Data", ScrambleMode.SCRAMBLING),
// 	OUT_KEY(5, "Outputting key", ScrambleMode.SCRAMBLING),
// 	DONE_SCRAMBLING(6, "Done", ScrambleMode.SCRAMBLING),
// 	
// 	LOAD_KEY(1, "Loading Key", ScrambleMode.DESCRAMBLING),
// 	LOAD_SCRAMBLED_DATA(2, "Loading Scrambled Data", ScrambleMode.DESCRAMBLING),
// 	DESCRAMBLING(3, "Descrambling", ScrambleMode.DESCRAMBLING),
// 	OUT_DESCRAMBLED_DATA(4, "Outputting Descrambled Data", ScrambleMode.DESCRAMBLING),
// 	DONE_DESCRAMBLING(5, "Done", ScrambleMode.DESCRAMBLING);
// 
// 	/** The step number of the step. */
// 	public final int stepNo;
// 	/** The name of the step. */
// 	public final String stepName;
// 	/** The mode the step is part of. */
// 	public final ScrambleMode mode;
// 	
// 	Step(int stepNo, String name, ScrambleMode mode){
// 		this.stepNo = stepNo;
// 		this.stepName = name;
// 		this.mode = mode;
// 	}
// 
// 	/**
// 	 * Gets the steps that are part of a mode.
// 	 * @param mode The mode to get the steps of
// 	 * @return The list of steps in the mode.
// 	 */
// 	public static List<Step> getStepsIn(ScrambleMode mode){
// 		List<Step> steps = new LinkedList<>();
// 
// 		for(Step curStep : Step.values()){
// 			if(
// 				curStep == NOT_STARTED_SCRAMBLE ||
// 				curStep == NOT_STARTED_DESCRAMBLE ||
// 				curStep == DONE_DESCRAMBLING ||
// 				curStep == DONE_SCRAMBLING
// 			){
// 				continue;
// 			}
// 			if(curStep.mode == mode){
// 				steps.add(curStep);
// 			}
// 		}
// 		return steps;
// 	}
// }


// Path: implementations/java/OWAT-lib/src/main/java/com/ebp/owat/lib/runner/utils/results/RunResults.java
import com.ebp.owat.lib.datastructure.value.NodeMode;
import com.ebp.owat.lib.runner.utils.MatrixMode;
import com.ebp.owat.lib.runner.utils.ScrambleMode;
import com.ebp.owat.lib.runner.utils.Step;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Collection;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;

package com.ebp.owat.lib.runner.utils.results;



/**
 * Results of a run, keeps information about it for reporting.
 *
 * This is the abstract class to genericize data kept by both types of run (scrambling/descrambling)
 */
public abstract class RunResults {
	private static final Logger LOGGER = LoggerFactory.getLogger(RunResults.class);

	/**
	 * Constructor to set the scrambleMode of this scramble scrambleMode
	 * @param scrambleMode The scrambleMode of this run.
	 */
	public RunResults(ScrambleMode scrambleMode){
		this.scrambleMode = scrambleMode;
		if(this.scrambleMode == ScrambleMode.SCRAMBLING){
			this.curStep = Step.NOT_STARTED_SCRAMBLE;
		}
		if(this.scrambleMode == ScrambleMode.DESCRAMBLING){
			this.curStep = Step.NOT_STARTED_DESCRAMBLE;
		}
	}

	/**
	 * Constructor to setup the scramble and node modes.
	 * @param scrambleMode The scramble mode of this run.
	 * @param nodeMode The node mode of this run.
	 */
	public RunResults(ScrambleMode scrambleMode, NodeMode nodeMode) {