package org.i3xx.cloud.data.coor.service.threeway;

import java.util.List;

public class LogParser {
	
	private List<LogData> list;

	public LogParser() {
		list = null;
	}

	/**
	 * @return the list
	 */
	public List<LogData> getList() {
		return list;
	}

	/**
	 * @param list the list to set
	 */
	public void setList(List<LogData> list) {
		this.list = list;
	}
	
	/**
	 * @param log
	 * @throws IllegalArgumentException
	 */
	public void parse(String log) throws IllegalArgumentException {
		try{
			list.clear();
			String[] p = log.split(LogData.separator);
			for(int i=0;i<p.length-2;i+=3) {
				list.add( new LogData(Integer.parseInt(p[i]), Integer.parseInt(p[i+1]), Integer.parseInt(p[i+2])) );
			}
		}catch(Exception e){
			IllegalArgumentException t = new IllegalArgumentException("Illegal Argument'"+log+"'.");
			t.initCause(e);
			throw t;
		}
	}

}

@@ -47,16 +47,45 @@
 way;%0D%0A%0D%0A
+import java.util.ArrayList;%0D%0A
 import j
@@ -161,16 +161,296 @@
  list;%0D%0A
+%09%0D%0A%09/**%0D%0A%09 * @param log%0D%0A%09 * @return%0D%0A%09 * @throws IllegalArgumentException%0D%0A%09 */%0D%0A%09public final static LogParser of(String log) %7B%0D%0A%09%09LogParser parser = new LogParser();%0D%0A%09%09parser.setList( new ArrayList%3CLogData%3E() );%0D%0A%09%09parser.parse(log);%0D%0A%09%09return parser;%0D%0A%09%7D%0D%0A%09%0D%0A%09/**%0D%0A%09 * %0D%0A%09 */
 %0D%0A%09publi

Add static factory function