| 构造器和说明 |
|---|
DoubleArray() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
build(byte[][] keys,
int[] values)
构建
|
void |
build(List<String> keys,
int[] values) |
List<Pair<Integer,Integer>> |
commonPrefixSearch(byte[] key,
int offset,
int maxResults)
Returns the keys that begins with the given key and its corresponding values.
|
int |
exactMatchSearch(byte[] key)
Returns the corresponding value if the key is found.
|
int |
exactMatchSearch(String key)
Returns the corresponding value if the key is found.
|
void |
open(InputStream stream)
Read from a stream.
|
void |
save(OutputStream stream)
Saves the trie data into a stream.
|
int |
size()
大小
|
public void build(byte[][] keys,
int[] values)
keys - 字节形式的键values - 值public void open(InputStream stream) throws IOException
stream - IOExceptionpublic void save(OutputStream stream) throws IOException
stream - IOExceptionpublic int exactMatchSearch(String key)
key - search keypublic int exactMatchSearch(byte[] key)
key - search keypublic List<Pair<Integer,Integer>> commonPrefixSearch(byte[] key, int offset, int maxResults)
key - offset - maxResults - public int size()
Copyright © 2014–2017 码农场. All rights reserved.