public class MultiTrie extends Trie
Constructor and Description |
---|
MultiTrie(boolean forward)
Constructor for the MultiTrie object
|
MultiTrie(java.io.DataInput is)
Constructor for the MultiTrie object.
|
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.CharSequence key,
java.lang.CharSequence cmd)
Add an element to this structure consisting of the given key and patch
command.
|
java.lang.CharSequence |
getFully(java.lang.CharSequence key)
Return the element that is stored in a cell associated with the given key.
|
java.lang.CharSequence |
getLastOnPath(java.lang.CharSequence key)
Return the element that is stored as last on a path belonging to the given
key.
|
void |
printInfo(java.io.PrintStream out,
java.lang.CharSequence prefix)
Print the given prefix and the position(s) in the Trie where it appears.
|
Trie |
reduce(Reduce by)
Remove empty rows from the given Trie and return the newly reduced Trie.
|
void |
store(java.io.DataOutput os)
Write this data structure to the given output stream.
|
getAll, getCells, getCellsPnt, getCellsVal
public MultiTrie(java.io.DataInput is) throws java.io.IOException
is
- the input streamjava.io.IOException
- if an I/O error occurspublic MultiTrie(boolean forward)
forward
- set to true if the elements should be read left to
rightpublic java.lang.CharSequence getFully(java.lang.CharSequence key)
public java.lang.CharSequence getLastOnPath(java.lang.CharSequence key)
getLastOnPath
in class Trie
key
- the key associated with the desired elementpublic void store(java.io.DataOutput os) throws java.io.IOException
public void add(java.lang.CharSequence key, java.lang.CharSequence cmd)
This method will return without executing if the cmd parameter's length is 0.
key
- the keycmd
- the patch commandpublic Trie reduce(Reduce by)
Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.