package innovimax.mixthem.arguments;

/**
* <p>This is a detailed enumeration of additional rule parameters.</p>
* @author Innovimax
* @version 1.0
*/
public enum RuleParam { 
	RANDOM_SEED("seed", ParamType.INTEGER),
	JOIN_COL1("col1", ParamType.INTEGER),
	JOIN_COL2("col2", ParamType.INTEGER),
	JOIN_COLS("col", ParamType.INTEGER_ARRAY),
	ZIP_SEP("sep", ParamType.STRING);

	private final String name;
	private final ParamType type;

	private RuleParam(final String name, final ParamType type) {
		this.name = name;
		this.type = type;
	}

	/**
	* Returns the alias name of this parameter.
	* @return The alias name of this parameter
	*/
	public String getName() {
		return this.name;
	}

	/**
 	* Returns the {@link ParamValue} representation of the parameter value.
 	* @param value The value of the parameter on command line
 	* @return The {@link ParamValue} representation of the parameter value
 	*/
	ParamValue createValue(final String value) throws NumberFormatException {
		ParamValue pv = null;
		switch (this.type) {
			case INTEGER:				
            			pv = ParamValue.createInt(Integer.parseInt(value));
            			break;
			case INTEGER_ARRAY:
				String[] stringArray = value.split(",");
				int[] intArray = new int[stringArray.length];
				for (int i=0; i < stringArray.length; i++) {
					intArray[i] = Integer.parseInt(stringArray[i]);
				}
            			pv = ParamValue.createIntArray(intArray);
            			break;
            		default:
            			pv = ParamValue.createString(value);
		}
		return pv;
	}

}

@@ -303,16 +303,17 @@
 OLS(%22col
+s
 %22, Param
@@ -678,24 +678,427 @@
 his.name;%0A%09%7D
+%0A%09%0A%09/**%0A%09* Returns the comment for this parameter.%0A%09* @return The comment for this parameter%0A%09*/%0A%09public String getComment() %7B%0A%09%09switch(this.type) %7B%0A%09%09%09case INTEGER:%0A            %09%09%09return this.name + %22 is an integer value%22;%0A%09%09%09case INTEGER_ARRAY:%0A%09%09%09%09return this.name + %22 is a list of integer separated by a comma%22;%0A            %09%09default:%0A            %09%09%09return this.name + %22 is a string value%22;%0A%09%09%7D%09%09%0A%09%7D
 %0A%0A%09/**%0A %09* R

Update RuleParam.java