private synchronized void fillSegment(char[] charArray , int begin , int length , int enabled){
		//获取字典表中的汉字对象
		Character beginChar = Character.valueOf(charArray[begin]);
		Character keyChar = charMap.get(beginChar);
		//字典中没有该字，则将其添加入字典
		if(keyChar == null){
			charMap.put(beginChar, beginChar);
			keyChar = beginChar;
		}
		
		//搜索当前节点的存储，查询对应keyChar的keyChar，如果没有则创建
		DictSegment ds = lookforSegment(keyChar , enabled);
		if(ds != null){
			//处理keyChar对应的segment
			if(length > 1){
				//词元还没有完全加入词典树
				ds.fillSegment(charArray, begin + 1, length - 1 , enabled);
			}else if (length == 1){
				//已经是词元的最后一个char,设置当前节点状态为enabled，
				//enabled=1表明一个完整的词，enabled=0表示从词典中屏蔽当前词
				ds.nodeState = enabled;
			}
		}

	}
private synchronized void fillSegment ( char [ ] charArray , int begin , int length , int enabled ) { Character beginChar = Character . valueOf ( charArray [ begin ] ) ; Character keyChar = charMap . get ( beginChar ) ; if ( keyChar == null ) { charMap . put ( beginChar , beginChar ) ; keyChar = beginChar ; } DictSegment ds = lookforSegment ( keyChar , enabled ) ; if ( ds != null ) { if ( length > 1 ) { ds . fillSegment ( charArray , begin + 1 , length - 1 , enabled ) ; } else if ( length == 1 ) { ds . nodeState = enabled ; } } }
加载填充词典片段
@param charArray
@param begin
@param length
@param enabled