public TrieNode getOrAddChild(boolean isWord, char c, TrieSymbolTable table, int code) throws SymbolException {
		if (cachedValueTrieNode == null) {
			cachedValueTrieNode = new TrieNode(c, this);
			cachedKeyChar = c;
			if (isWord) {
				cachedValueTrieNode.addEntry(table, code);
			} 
			return cachedValueTrieNode;
		} else if (cachedKeyChar == c) {
			if (isWord) {
				cachedValueTrieNode.addEntry(table, code);
			} 
			return cachedValueTrieNode;
		} else {
			TrieNode child = null; 
			if (children == null) {
				children = new HashMap<Character, TrieNode>();
//				children = new HashMap<Character, TrieNode>(INITIAL_CAPACITY);
				child = new TrieNode(c, this);
				children.put(c,child);
			} else {
				child = children.get(c);
				if (child == null) {
					child = new TrieNode(c, this);
					children.put(c,child);
				}
			}
			if (isWord) {
				child.addEntry(table, code);
			} 
			return child;
		}
	}