@Override
	public boolean insert(String string) {
			Node currentNode = root;
			char c;
			for (int i = 0; i < string.length(); i++) {
				c = string.charAt(i);
				if (c == '$') {	//到序列末尾
					if (currentNode.contains(c)) {	//如果已有这个序列，则只要结点计数加1
						currentNode.increaseCount();  
					}else {
						Node leaf = new LeafNode();
						currentNode.addChild('$', leaf);
						currentNode.increaseCount();
					}
					
				}else {	//未到序列末尾，就增加枝结点
					if (currentNode.contains(c)) {
						currentNode.increaseCount();
						currentNode = currentNode.next(c);
					}else {
						Node branch = new BranchNode(c);
						currentNode.addChild(c, branch);
						currentNode.increaseCount();
						currentNode = branch;
					}
				}
			}
			return true;
	}