|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectcom.hankcs.hanlp.collection.trie.bintrie.BaseNode<V>
V - 值public abstract class BaseNode<V>
节点,统一Trie树根和其他节点的基类
| 嵌套类摘要 | |
|---|---|
static class |
BaseNode.Status
|
class |
BaseNode.TrieEntry
|
| 字段摘要 | |
|---|---|
protected char |
c
节点代表的字符 |
protected BaseNode[] |
child
子节点 |
protected BaseNode.Status |
status
节点状态 |
protected V |
value
节点代表的值 |
| 构造方法摘要 | |
|---|---|
BaseNode()
|
|
| 方法摘要 | |
|---|---|
protected abstract boolean |
addChild(BaseNode node)
添加子节点 |
int |
compareTo(BaseNode other)
|
int |
compareTo(char other)
重载,与字符的比较 |
protected char |
getChar()
|
abstract BaseNode |
getChild(char c)
获取子节点 |
BaseNode.Status |
getStatus()
获取节点的成词状态 |
V |
getValue()
获取节点对应的值 |
protected boolean |
hasChild(char c)
是否含有子节点 |
void |
setValue(V value)
设置节点对应的值 |
String |
toString()
|
BaseNode<V> |
transition(char[] path,
int begin)
|
protected void |
walk(StringBuilder sb,
Set<Map.Entry<String,V>> entrySet)
|
protected void |
walkToLoad(ByteArray byteArray,
_ValueArray<V> valueArray)
|
protected void |
walkToSave(DataOutputStream out)
|
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 字段详细信息 |
|---|
protected BaseNode[] child
protected BaseNode.Status status
protected char c
protected V value
| 构造方法详细信息 |
|---|
public BaseNode()
| 方法详细信息 |
|---|
public BaseNode<V> transition(char[] path,
int begin)
protected abstract boolean addChild(BaseNode node)
protected boolean hasChild(char c)
c - 子节点的char
protected char getChar()
public abstract BaseNode getChild(char c)
c - 子节点的char
public final V getValue()
public final void setValue(V value)
value - 值public int compareTo(BaseNode other)
Comparable<BaseNode> 中的 compareTopublic int compareTo(char other)
other -
public BaseNode.Status getStatus()
protected void walk(StringBuilder sb,
Set<Map.Entry<String,V>> entrySet)
protected void walkToSave(DataOutputStream out)
throws IOException
IOException
protected void walkToLoad(ByteArray byteArray,
_ValueArray<V> valueArray)
public String toString()
Object 中的 toString
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||