<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mediawiki.zeropage.org/index.php?action=history&amp;feed=atom&amp;title=ClassifyByAnagram%2FPassion</id>
	<title>ClassifyByAnagram/Passion - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mediawiki.zeropage.org/index.php?action=history&amp;feed=atom&amp;title=ClassifyByAnagram%2FPassion"/>
	<link rel="alternate" type="text/html" href="https://mediawiki.zeropage.org/index.php?title=ClassifyByAnagram/Passion&amp;action=history"/>
	<updated>2026-05-15T20:58:39Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.8</generator>
	<entry>
		<id>https://mediawiki.zeropage.org/index.php?title=ClassifyByAnagram/Passion&amp;diff=84215&amp;oldid=prev</id>
		<title>Maintenance script: Repair batch-0001 pages from live compare</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.zeropage.org/index.php?title=ClassifyByAnagram/Passion&amp;diff=84215&amp;oldid=prev"/>
		<updated>2026-03-26T23:56:04Z</updated>

		<summary type="html">&lt;p&gt;Repair batch-0001 pages from live compare&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:56, 26 March 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l178&quot;&gt;Line 178:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 178:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  	}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  	}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  	&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  	&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  	public static void main(String&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[] &lt;/del&gt;args) throws IOException&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  	public static void main(String&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;#91;&amp;amp;#93; &lt;/ins&gt;args) throws IOException&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  	{&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  	{&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  		long start = System.currentTimeMillis();&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  		long start = System.currentTimeMillis();&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l187&quot;&gt;Line 187:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 187:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  		parser.parse();&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  		parser.parse();&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  		  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  		  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  		PrintStream out = new PrintStream(new BufferedOutputStream( new FileOutputStream( args&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[&lt;/del&gt;0&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;] &lt;/del&gt;)));&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  		PrintStream out = new PrintStream(new BufferedOutputStream( new FileOutputStream( args&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;#91;&lt;/ins&gt;0&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;#93; &lt;/ins&gt;)));&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  		parser.printResult(out);&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  		parser.printResult(out);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  		&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  		&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l315&quot;&gt;Line 315:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 315:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  	&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  	&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  }&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.zeropage.org/index.php?title=ClassifyByAnagram/Passion&amp;diff=30269&amp;oldid=prev</id>
		<title>imported&gt;Unknown at 05:22, 7 February 2021</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.zeropage.org/index.php?title=ClassifyByAnagram/Passion&amp;diff=30269&amp;oldid=prev"/>
		<updated>2021-02-07T05:22:53Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Parser.java ==&lt;br /&gt;
 package anagram;&lt;br /&gt;
 &lt;br /&gt;
 import java.io.BufferedOutputStream;&lt;br /&gt;
 import java.io.BufferedReader;&lt;br /&gt;
 import java.io.ByteArrayInputStream;&lt;br /&gt;
 import java.io.File;&lt;br /&gt;
 import java.io.FileInputStream;&lt;br /&gt;
 import java.io.FileNotFoundException;&lt;br /&gt;
 import java.io.FileOutputStream;&lt;br /&gt;
 import java.io.IOException;&lt;br /&gt;
 import java.io.InputStream;&lt;br /&gt;
 import java.io.InputStreamReader;&lt;br /&gt;
 import java.io.PrintStream;&lt;br /&gt;
 import java.util.ArrayList;&lt;br /&gt;
 import java.util.Enumeration;&lt;br /&gt;
 import java.util.Hashtable;&lt;br /&gt;
 import java.util.Iterator;&lt;br /&gt;
 import java.util.List;&lt;br /&gt;
 &lt;br /&gt;
 public class Parser {&lt;br /&gt;
 	&lt;br /&gt;
 	/**&lt;br /&gt;
 	 * @param file&lt;br /&gt;
 	 */&lt;br /&gt;
 	public Parser(File file) throws FileNotFoundException {&lt;br /&gt;
 		this(new FileInputStream(file));&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 	Hashtable result;&lt;br /&gt;
 	InputStream ins;&lt;br /&gt;
 	&lt;br /&gt;
 	/**&lt;br /&gt;
 	 * @param in&lt;br /&gt;
 	 */&lt;br /&gt;
 	public Parser(InputStream in) {&lt;br /&gt;
 		this.ins = in;&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 	/**&lt;br /&gt;
 	 * @param input&lt;br /&gt;
 	 */&lt;br /&gt;
 	public Parser(String input) {&lt;br /&gt;
 		ByteArrayInputStream byteInputStream = new ByteArrayInputStream( input.getBytes() );&lt;br /&gt;
 		this.ins = byteInputStream;&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	/**&lt;br /&gt;
 	 * 입력을 파싱해서 결과를 분석하는 함수&lt;br /&gt;
 	 * &lt;br /&gt;
 	 */&lt;br /&gt;
 	public void parse() throws IOException {&lt;br /&gt;
 		result = new Hashtable();&lt;br /&gt;
 		&lt;br /&gt;
 		List lines = getItemLines();&lt;br /&gt;
 		String item;&lt;br /&gt;
 		String itemKey;&lt;br /&gt;
 		for(int i=0 ; i&amp;amp;lt;lines.size() ; i++)&lt;br /&gt;
 		{&lt;br /&gt;
 			item = (String)lines.get(i);&lt;br /&gt;
 			&lt;br /&gt;
 			itemKey = sortString(item);&lt;br /&gt;
 			&lt;br /&gt;
 			List itemList  = (List)result.get(itemKey);&lt;br /&gt;
 				&lt;br /&gt;
 			if (isCreated(itemList))&lt;br /&gt;
 			{&lt;br /&gt;
 				itemList = createNewEntry(itemKey);&lt;br /&gt;
 			}&lt;br /&gt;
 			&lt;br /&gt;
 			itemList .add(item);&lt;br /&gt;
 		}&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 	private List createNewEntry(String itemKey) {&lt;br /&gt;
 		List itemList;&lt;br /&gt;
 		itemList = new ArrayList();&lt;br /&gt;
 		result.put(itemKey, itemList);&lt;br /&gt;
 		return itemList;&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 	private boolean isCreated(List itemList) {&lt;br /&gt;
 		return itemList == null;&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 	/**&lt;br /&gt;
 	 * 입력된 Item 의 갯수를 얻는 함수&lt;br /&gt;
 	 * @return&lt;br /&gt;
 	 */&lt;br /&gt;
 	public int getItemCount() throws IOException {&lt;br /&gt;
 		List lines = getItemLines();&lt;br /&gt;
 		return lines.size();&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 	/**&lt;br /&gt;
 	 * 입력된 Item의 목록을 얻는 함수&lt;br /&gt;
 	 * @return&lt;br /&gt;
 	 */&lt;br /&gt;
 	private List getItemLines() throws IOException {&lt;br /&gt;
 		ArrayList lineList= new ArrayList();&lt;br /&gt;
 &lt;br /&gt;
 		BufferedReader in = new BufferedReader(new InputStreamReader(ins));&lt;br /&gt;
 		&lt;br /&gt;
 		String line;&lt;br /&gt;
 		&lt;br /&gt;
 		while((line = in.readLine()) != null)&lt;br /&gt;
 		{&lt;br /&gt;
 			if (isValidLine(line))&lt;br /&gt;
 				lineList.add(line);&lt;br /&gt;
 		}&lt;br /&gt;
 		&lt;br /&gt;
 		return lineList;&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 	private boolean isValidLine(String line) {&lt;br /&gt;
 		return line.trim().length() &amp;amp;gt; 0;&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 	/**&lt;br /&gt;
 	 * @return&lt;br /&gt;
 	 */&lt;br /&gt;
 	public int  getCount() {&lt;br /&gt;
 		return result.size();&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 	/**&lt;br /&gt;
 	 * @param input&lt;br /&gt;
 	 * @return&lt;br /&gt;
 	 */&lt;br /&gt;
 	public static String sortString(String input) {&lt;br /&gt;
 		char tmpChar;&lt;br /&gt;
 		StringBuffer buffer = new StringBuffer(input);&lt;br /&gt;
 		for(int i=0; i&amp;amp;lt;buffer.length()-1 ; i++)&lt;br /&gt;
 		{&lt;br /&gt;
 			for(int j=i+1; j&amp;amp;lt;buffer.length() ; j++)&lt;br /&gt;
 			{&lt;br /&gt;
 				if (buffer.charAt(i) &amp;amp;gt; buffer.charAt(j))&lt;br /&gt;
 				{&lt;br /&gt;
 					tmpChar = buffer.charAt(i);&lt;br /&gt;
 					buffer.setCharAt(i, buffer.charAt(j));&lt;br /&gt;
 					buffer.setCharAt(j, tmpChar);&lt;br /&gt;
 				}&lt;br /&gt;
 			}&lt;br /&gt;
 		}&lt;br /&gt;
 		&lt;br /&gt;
 		return buffer.toString();&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 	/**&lt;br /&gt;
 	 * @param sortedItem&lt;br /&gt;
 	 * @return&lt;br /&gt;
 	 */&lt;br /&gt;
 	public int getContainsCount(String itemKey) {&lt;br /&gt;
 		List list = (List)result.get(itemKey);&lt;br /&gt;
 		&lt;br /&gt;
 		if (list == null)&lt;br /&gt;
 			return 0;&lt;br /&gt;
 		else		&lt;br /&gt;
 			return list.size();&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	public void printResult(PrintStream out)&lt;br /&gt;
 	{&lt;br /&gt;
 		Enumeration enum = result.elements();&lt;br /&gt;
 		List list;&lt;br /&gt;
 		Iterator iterator;&lt;br /&gt;
 		for(;enum.hasMoreElements();)&lt;br /&gt;
 		{&lt;br /&gt;
 			list = (List)enum.nextElement();&lt;br /&gt;
 			iterator = list.iterator();&lt;br /&gt;
 			for(;iterator.hasNext();)&lt;br /&gt;
 			{&lt;br /&gt;
 				out.print((String)iterator.next());&lt;br /&gt;
 				out.print(&amp;quot; &amp;quot;);&lt;br /&gt;
 			}&lt;br /&gt;
 			out.println();&lt;br /&gt;
 		}&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	public static void main(String[] args) throws IOException&lt;br /&gt;
 	{&lt;br /&gt;
 		long start = System.currentTimeMillis();&lt;br /&gt;
 &lt;br /&gt;
 		String filename = &amp;quot;inputFile3.txt&amp;quot;;&lt;br /&gt;
 		InputStream in = new FileInputStream(filename);&lt;br /&gt;
 		Parser parser = new Parser(System.in);&lt;br /&gt;
 		parser.parse();&lt;br /&gt;
 		 &lt;br /&gt;
 		PrintStream out = new PrintStream(new BufferedOutputStream( new FileOutputStream( args[0] )));&lt;br /&gt;
 		parser.printResult(out);&lt;br /&gt;
 		&lt;br /&gt;
 		long end = System.currentTimeMillis();&lt;br /&gt;
 		&lt;br /&gt;
 		System.out.println(&amp;quot;time : &amp;quot;+(end-start)+&amp;quot;millis&amp;quot;);&lt;br /&gt;
 		&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== AnagramTest.java ==&lt;br /&gt;
 package test;&lt;br /&gt;
 &lt;br /&gt;
 import java.io.File;&lt;br /&gt;
 import java.io.FileInputStream;&lt;br /&gt;
 import java.io.FileNotFoundException;&lt;br /&gt;
 import java.io.IOException;&lt;br /&gt;
 import java.io.InputStream;&lt;br /&gt;
 &lt;br /&gt;
 import junit.framework.TestCase;&lt;br /&gt;
 import anagram.Parser;&lt;br /&gt;
 &lt;br /&gt;
 /**&lt;br /&gt;
  * @author lgk9&lt;br /&gt;
  */&lt;br /&gt;
 public class AnagramTest extends TestCase {&lt;br /&gt;
 	&lt;br /&gt;
 	String input;&lt;br /&gt;
 	String input2;&lt;br /&gt;
 	String input3;&lt;br /&gt;
 	String input4;&lt;br /&gt;
 	&lt;br /&gt;
 	private Parser parser;&lt;br /&gt;
 	private Parser parser2;&lt;br /&gt;
 	 &lt;br /&gt;
 	public void setUp()&lt;br /&gt;
 	{&lt;br /&gt;
 		input = &amp;quot;abc&amp;quot;;&lt;br /&gt;
 		input2 = &amp;quot;cde&amp;quot;;&lt;br /&gt;
 		input3 = &amp;quot;abc\nbcde&amp;quot;;&lt;br /&gt;
 		input4 = &amp;quot;abc\naabb\nacb\ncdd\ncba\nbaab\nbac\ndcd\nxds\n&amp;quot;;&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	public void testOneLine1() throws IOException&lt;br /&gt;
 	{&lt;br /&gt;
 		parser = new  Parser(input);&lt;br /&gt;
 		parser.parse();&lt;br /&gt;
 		&lt;br /&gt;
 		assertEquals(1, parser.getCount());&lt;br /&gt;
 		&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 	public void testOneLine2() throws IOException&lt;br /&gt;
 	{&lt;br /&gt;
 		parser = new  Parser(input2);&lt;br /&gt;
 		parser.parse();&lt;br /&gt;
 		&lt;br /&gt;
 		assertEquals(1, parser.getCount());&lt;br /&gt;
 		&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 	public void testTwoLine() throws IOException&lt;br /&gt;
 	{&lt;br /&gt;
 		parser = new  Parser(input3);&lt;br /&gt;
 		parser.parse();&lt;br /&gt;
 		&lt;br /&gt;
 		assertEquals(2, parser.getCount());&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	&lt;br /&gt;
 	public void testGetItemCount() throws IOException&lt;br /&gt;
 	{&lt;br /&gt;
 		parser = new  Parser(input);&lt;br /&gt;
 		parser2 = new Parser(input3);&lt;br /&gt;
 		&lt;br /&gt;
 		assertEquals(1, parser.getItemCount());&lt;br /&gt;
 		assertEquals(2, parser2.getItemCount());&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	public void testEquals()&lt;br /&gt;
 	{&lt;br /&gt;
 		String input = &amp;quot;bca&amp;quot;;&lt;br /&gt;
 		String input2 = &amp;quot;ccabc&amp;quot;;&lt;br /&gt;
 		String input3 = &amp;quot;xds&amp;quot;;&lt;br /&gt;
 		&lt;br /&gt;
 		assertEquals(&amp;quot;abc&amp;quot;, Parser.sortString(input));&lt;br /&gt;
 		assertEquals(&amp;quot;abccc&amp;quot;, Parser.sortString(input2));&lt;br /&gt;
 		assertEquals(&amp;quot;dsx&amp;quot;, Parser.sortString(input3));&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	public void testContains() throws IOException&lt;br /&gt;
 	{&lt;br /&gt;
 		&lt;br /&gt;
 		parser = new Parser(input);&lt;br /&gt;
 		parser.parse();&lt;br /&gt;
 		&lt;br /&gt;
 		String sortedItem = Parser.sortString(input);&lt;br /&gt;
 		assertEquals(1, parser.getContainsCount(sortedItem));&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 	public void testContains2() throws IOException&lt;br /&gt;
 	{&lt;br /&gt;
 		parser = new Parser(input4);&lt;br /&gt;
 		parser.parse();&lt;br /&gt;
 		&lt;br /&gt;
 		assertEquals(4, parser.getContainsCount(Parser.sortString(&amp;quot;abc&amp;quot;)));&lt;br /&gt;
 		assertEquals(2, parser.getContainsCount(Parser.sortString(&amp;quot;aabb&amp;quot;)));&lt;br /&gt;
 		assertEquals(2, parser.getContainsCount(Parser.sortString(&amp;quot;cdd&amp;quot;)));&lt;br /&gt;
 		assertEquals(1, parser.getContainsCount(Parser.sortString(&amp;quot;xds&amp;quot;)));&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	public void testReadFie() throws IOException&lt;br /&gt;
 	{&lt;br /&gt;
 		String filename = &amp;quot;inputFile1.txt&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
 		parser = new Parser(new File(filename));&lt;br /&gt;
 		assertEquals(2284 , parser.getItemCount());&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	public void testParse() throws IOException&lt;br /&gt;
 	{&lt;br /&gt;
 		String filename = &amp;quot;inputFile3.txt&amp;quot;;&lt;br /&gt;
 		&lt;br /&gt;
 		parser = new Parser(new File(filename));&lt;br /&gt;
 		parser.parse();&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 }&lt;br /&gt;
&lt;/div&gt;</summary>
		<author><name>imported&gt;Unknown</name></author>
	</entry>
</feed>