<commit_before>package edu.kit.iks.Cryptographics.Caesar;

/**
 * Class that keeps track of the current states and controls the switching
 * between them.
 * 
 * @author <NAME>.
 * 
 */
public class CStateController {

	/**
	 * Switches to the next state.
	 */
	public void nextState() {
        //forward.
	}
	
	/**
	 * Switches to the previous state.
	 */
	public void previousState() {
        //backward.
	}
	
	

}<commit_msg>Done the implementing of the state pattern and state switching for Caesar.<commit_after>package edu.kit.iks.Cryptographics.Caesar;

import java.util.HashMap;
import java.util.Map;

import edu.kit.iks.Cryptographics.Caesar.Demonstration.CFirstState;
import edu.kit.iks.Cryptographics.Caesar.Demonstration.CSecondState;
import edu.kit.iks.Cryptographics.Caesar.Experiment.CFifthState;
import edu.kit.iks.Cryptographics.Caesar.Experiment.CFourthState;
import edu.kit.iks.Cryptographics.Caesar.Experiment.CThirdState;

/**
 * Class that keeps track of the current states and controls the switching
 * between them.
 * 
 * @author <NAME>.
 * 
 */
public class CStateController {

	/**
	 * Key that keeps track of the current state. Is in- and decremented when
	 * switching to next/previous state. Zero means the visualization hasn't
	 * begun.
	 */
	protected int key = 0;

	/**
	 * @return
	 */
	public Map<Integer, Class> getControllerClasses() {
		Map<Integer, Class> controllerClasses = new HashMap<Integer, Class>();

		controllerClasses.put(1, CFirstState.class);
		controllerClasses.put(2, CSecondState.class);
		controllerClasses.put(3, CThirdState.class);
		controllerClasses.put(4, CFourthState.class);
		controllerClasses.put(5, CFifthState.class);

		return controllerClasses;
	}

	/**
	 * Switches to the next state.
	 */
	public Class nextState() {
		key++;
		return getControllerClasses().get(key);
	}

	/**
	 * Switches to the previous state.
	 */
	public Class previousState() {
		key--;
		return getControllerClasses().get(key);
	}

}
{'fraction_non_alphanumeric': 0.11678463094034378, 'fraction_numerical': 0.003033367037411527, 'mean_word_length': 3.7572115384615383, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '378827', 'n_tokens_mistral': 675, 'n_tokens_neox': 603, 'n_words': 157}