<commit_before>package org.u_compare.gui.model.parameters;
import org.u_compare.gui.model.parameters.constraints.ConstraintFailedException;

public class StringParameter extends AbstractParameter{

	private String parameter; //null represents unset. TODO change this to an arraylist
	
	public StringParameter(String name, String description, boolean mandatory, String parameter){
		super(name, description, mandatory, false);
		
		this.parameter = parameter;
	}
	
	public StringParameter(String name, String description, boolean mandatory, String[] parameter){
		super(name, description, mandatory, true);
		
		//this.parameter = parameter;TODO
	}
	
	public String getParameter(){
		return parameter;
	}

	public void setValue(String input) throws ConstraintFailedException {
		
		if(!input.equals(parameter)){
			parameter = input;
			validateConstraints(input);	
			notifyParameterValueChangedListeners();
		}
		
	}

	public String getParameterString() {
		if(parameter != null){
			return parameter;
		}else{
			return "";
		}
	}
}
<commit_msg>String parameter switched to use an Arraylist to store parameter values.<commit_after>package org.u_compare.gui.model.parameters;
import java.util.ArrayList;

import org.u_compare.gui.model.parameters.constraints.ConstraintFailedException;

public class StringParameter extends AbstractParameter{

	private ArrayList<String> parametersArrayList = new ArrayList<String>(); //empty represents unset.
	
	public StringParameter(String name, String description, boolean mandatory, String parameter){
		super(name, description, mandatory, false);
		parametersArrayList.add(0, parameter);//TODO this should use an add method locally to ensure constraints.
	}
	
	public StringParameter(String name, String description, boolean mandatory, String[] parameter){
		super(name, description, mandatory, true);
		
		//this.parameter = parameter;TODO
	}
	
	public String getParameter(){
		if(parametersArrayList.size()>0){
			return parametersArrayList.get(0);
		} else {
			return null;
		}
	}

	public void setValue(String input) throws ConstraintFailedException {
		
		if(!input.equals(getParameter())){
			validateConstraints(input);	
			parametersArrayList.set(0, input);
			notifyParameterValueChangedListeners();
		}
		
	}

	public String getParameterString() {
		String parameter = getParameter();
		if(parameter != null){
			return parameter;
		}else{
			return "";
		}
	}
}

{'fraction_non_alphanumeric': 0.09730848861283643, 'fraction_numerical': 0.0016563146997929607, 'mean_word_length': 4.98019801980198, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, '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': '826173', 'n_tokens_mistral': 701, 'n_tokens_neox': 620, 'n_words': 177}