Mercurial > hg > Members > nobuyasu > TestNeo4j
annotate src/howtouse/WikiLinkParser.java @ 17:e30f2714686b draft
fix CharReader.java
author | one |
---|---|
date | Thu, 23 Aug 2012 17:36:46 +0900 |
parents | b56ff507cdb4 |
children | 2c3a10047ec6 |
rev | line source |
---|---|
8 | 1 package howtouse; |
2 | |
9 | 3 import java.util.HashSet; |
8 | 4 |
5 public class WikiLinkParser { | |
6 | |
9 | 7 private CharReader reader; |
8 | |
9 WikiLinkParser() { | |
10 reader = new CharReader(); | |
11 } | |
8 | 12 |
9 | 13 public HashSet<String> parse(String text) { |
14 HashSet<String> hash = new HashSet<String>(); | |
15 | |
16 reader.setText(text); | |
17 String str; | |
18 while ( (str = reader.getToken()) != null) hash.add(str); | |
19 | |
20 return hash; | |
21 | |
22 } | |
8 | 23 } |