package innovimax.mixthem.operation;

import innovimax.mixthem.MixException;
import innovimax.mixthem.MixThem;
import innovimax.mixthem.arguments.RuleParam;
import innovimax.mixthem.arguments.ParamValue;

import java.util.logging.Level;
import java.util.Map;

/**
* <p>Zips two lines on a common field.</p>
* @see ILineOperation
* @author Innovimax
* @version 1.0
*/
public class DefaultLineZipping implements ILineOperation {

	private final Map<RuleParam, ParamValue> params;
	
	/**
 	* @param params The list of parameters (maybe empty)
	* @see innovimax.mixthem.operation.RuleParam
	* @see innovimax.mixthem.operation.ParamValue
	*/
	public DefaultLineZipping(Map<RuleParam, ParamValue> params) {
		this.params = params;
	}
	
	/**
 	* Returns the result of zipping two lines.
	* @param line1 The first line to zip
 	* @param line2 The second line to zip	
 	* @return The result of zipping two lines
 	* @throws MixException - If an mixing error occurs
 	*/
	@Override
	public String process(String line1, String line2) throws MixException {
		String zippedLine = null;
		if (line1 != null && line2 != null) {
      			MixThem.LOGGER.logp(Level.INFO, "DefaultLineZipping", "zip-line", "TO IMPLEMENT");
			MixThem.LOGGER.info("Params " + params.toString());
		}
		return zippedLine;
	}

}

@@ -1050,23 +1050,16 @@
 ring zip
-pedLine
  = null;
@@ -1098,17 +1098,16 @@
  null) %7B
-%0A
       %09%09
@@ -1107,16 +1107,20 @@
      %09%09%09
+%0A%09%09%09
 MixThem.
@@ -1130,118 +1130,392 @@
 GER.
-logp(Level.INFO, %22DefaultLineZipping%22, %22zip-line%22, %22TO IMPLEMENT%22);%0A%09%09%09MixThem.LOGGER.info(%22Params %22 + params.
+info(%22Params %22 + params.toString());%09%09%09%09%09%09%09%09%09%0A%09%09%7D%0A%09%09return zip;%0A%09%7D%0A%09%0A%09private class ZipTuple %7B%0A%09%09%0A%09%09private final char c1;%0A%09%09private final char c2;%0A%09%09private final String sep;%0A%09%09%0A%09%09private ZipTuple(char c1, char c2) %7B%0A%09%09%09this(c1, c2, %22 %22);%0A%09%09%7D%0A%0A%09%09private ZipTuple(char c1, char c2, String sep) %7B%0A%09%09%09this.c1 = c1;%0A%09%09%09this.c2 = c2;%0A%09%09%09this.sep = sep;%0A%09%09%7D%0A%09%09%0A%09%09@Override%0A%09%09public String 
 toSt
@@ -1520,23 +1520,20 @@
 String()
-);
+ %7B
 %0A%09
-%09%7D%0A
 %09%09return
@@ -1537,19 +1537,53 @@
 urn 
-zippedLine;
+'(' + this.c1 + this.sep + this.c2 + ')';%0A%09%09%7D
 %0A%09%7D%0A

add private class