node
Old notes
Node
class Node {
char ch = START;
List<Node> = List.newArrayList();
void add (String str) {
if (str.length() == 0)
return;
char chNew = str.charAt(0);
for (Node n : nodes) {
if (n.ch == chNew) {
n.add (str.substring(1));
return;
}
Node newNode = new Node();
newNode.ch = chNew;
new Node.add(str.substring(1));
nodes.add(newNode);
}
String toRegexp() {
StringBuilder