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", false, ParamType._INTEGER),
	_JOIN_COL1("col1", false, ParamType._INTEGER),
	_JOIN_COL2("col2", false, ParamType._INTEGER);

	private final String name;
	private final boolean required;
	private final ParamType type;

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

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

	/**
	* Returns true if the parameter is required.
	* @return True if the parameter is required
	*/
	public boolean isRequired() {
		return this.required;
	}

	/**
 	* 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(String value) throws NumberFormatException {
		ParamValue pv = null;
		switch (this.type) {
			case _INTEGER:				
            			pv = new ParamValue(Integer.parseInt(value));
            			break;
            		default:
            			pv = new ParamValue(value);
		}
		return pv;
	}

}

@@ -190,23 +190,16 @@
 (%22seed%22,
- false,
  ParamTy
@@ -231,23 +231,16 @@
 (%22col1%22,
- false,
  ParamTy
@@ -277,13 +277,44 @@
 2%22, 
-false
+ParamType._INTEGER),%0A%09_ZIP_SEP(%22sep%22
 , Pa
@@ -322,23 +322,22 @@
 amType._
-INTEGER
+STRING
 );%0A%0A%09pri
@@ -364,41 +364,8 @@
 me;%0A
-%09private final boolean required;%0A
 %09pri
@@ -427,26 +427,8 @@
 ame,
- boolean required,
  Par
@@ -466,36 +466,8 @@
 me;%0A
-%09%09this.required = required;%0A
 %09%09th
@@ -639,167 +639,8 @@
 %09%7D%0A%0A
-%09/**%0A%09* Returns true if the parameter is required.%0A%09* @return True if the parameter is required%0A%09*/%0A%09public boolean isRequired() %7B%0A%09%09return this.required;%0A%09%7D%0A%0A
 %09/**

remove required attr, add sep to enum