public class MultiTrieReader extends Object implements TrieReader
MultiTrieReader merges two trie readers, providing
output that is the result of adding the counts from the two readers.| Constructor and Description |
|---|
MultiTrieReader(TrieReader reader1,
TrieReader reader2)
Construct a multiple trie reader that returns counts that
are the sum of the two readers' counts.
|
| Modifier and Type | Method and Description |
|---|---|
long |
readCount()
Returns the count of the next tree.
|
long |
readSymbol()
Returns the identifier of the symbol leading from the root of
the current tree to the daughter subtree for the symbol, or
-1 if there are no more subtrees for the current
node. |
public MultiTrieReader(TrieReader reader1, TrieReader reader2)
reader1 - First reader.reader2 - Second reader.public long readSymbol()
throws IOException
TrieReader-1 if there are no more subtrees for the current
node.readSymbol in interface TrieReaderIOException - If there is an underlying I/O error.public long readCount()
throws IOException
TrieReaderreadCount in interface TrieReaderIOException - If there is an underlying I/O error.Copyright © 2019 Alias-i, Inc.. All rights reserved.