public class Alphabet extends Object implements ICacheAble
| Constructor and Description |
|---|
Alphabet() |
| Modifier and Type | Method and Description |
|---|---|
int |
build(TreeMap<String,Integer> keyValueMap) |
Integer |
idOf(char[] label)
label转id
|
Integer |
idOf(String label)
label转id
|
String |
labelOf(int id)
id转label
|
boolean |
load(ByteArray byteArray)
载入
|
void |
save(DataOutputStream out)
写入
|
int |
size()
字母表大小
|
public String labelOf(int id)
id - public Integer idOf(char[] label)
label - public int size()
public void save(DataOutputStream out) throws Exception
ICacheAblesave in interface ICacheAbleExceptionpublic boolean load(ByteArray byteArray)
ICacheAbleload in interface ICacheAbleCopyright © 2014–2021 码农场. All rights reserved.