view src/howtouse/WikiLinkParser.java @ 17:e30f2714686b draft

fix CharReader.java
author one
date Thu, 23 Aug 2012 17:36:46 +0900 (2012-08-23)
parents b56ff507cdb4
children 2c3a10047ec6
line wrap: on
line source
package howtouse;

import java.util.HashSet;

public class WikiLinkParser {

	private CharReader reader;

	WikiLinkParser() {
		reader = new CharReader();
	}
	
	public HashSet<String> parse(String text) {
		HashSet<String> hash = new HashSet<String>();
		
		reader.setText(text);
		String str;
		while ( (str = reader.getToken()) != null) hash.add(str); 
			
		return hash;
		
	}
}