public class SmartForest<T> extends Object implements Comparable<SmartForest<T>>
| Modifier and Type | Field and Description |
|---|---|
SmartForest<T>[] |
branches
status 此字的状态1,继续 2,是个词语但是还可以继续 ,3确定 nature 词语性质
|
| Constructor and Description |
|---|
SmartForest() |
SmartForest(char c,
int status,
T param) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(String keyWord,
T t)
增加新词
|
int |
compareTo(char c) |
int |
compareTo(SmartForest<T> o) |
boolean |
contains(char c)
二分查找是否包含
|
boolean |
equals(char c) |
int |
get(char c) |
SmartForest<T> |
getBranch(String keyWord)
根据一个词获得所取的参数,没有就返回null
|
char |
getC() |
T |
getParam() |
byte |
getStatus() |
int |
hashCode() |
static void |
main(String[] args) |
void |
setParam(T param) |
void |
setStatus(int status) |
public SmartForest<T>[] branches
public SmartForest()
public SmartForest(char c,
int status,
T param)
public int get(char c)
public boolean contains(char c)
c - public int compareTo(char c)
public boolean equals(char c)
public byte getStatus()
public void setStatus(int status)
public char getC()
public T getParam()
public void setParam(T param)
public int compareTo(SmartForest<T> o)
compareTo in interface Comparable<SmartForest<T>>public SmartForest<T> getBranch(String keyWord)
keyWord - public static void main(String[] args)
Copyright © 2013. All Rights Reserved.