MultiTrie2
public class MultiTrie extends Trie
Constructor | Description |
---|---|
MultiTrie(boolean forward) |
Constructor for the MultiTrie object
|
MultiTrie(DataInput is) |
Constructor for the MultiTrie object.
|
Modifier and Type | Method | Description |
---|---|---|
void |
add(CharSequence key,
CharSequence cmd) |
Add an element to this structure consisting of the given key and patch
command.
|
CharSequence |
getFully(CharSequence key) |
Return the element that is stored in a cell associated with the given key.
|
CharSequence |
getLastOnPath(CharSequence key) |
Return the element that is stored as last on a path belonging to the given
key.
|
void |
printInfo(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(DataOutput os) |
Write this data structure to the given output stream.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAll, getCells, getCellsPnt, getCellsVal
public MultiTrie(DataInput is) throws IOException
is
- the input streamIOException
- if an I/O error occurspublic MultiTrie(boolean forward)
forward
- set to true if the elements should be read left to
rightpublic CharSequence getFully(CharSequence key)
public CharSequence getLastOnPath(CharSequence key)
getLastOnPath
in class Trie
key
- the key associated with the desired elementpublic void store(DataOutput os) throws IOException
store
in class Trie
os
- the output streamIOException
- if an I/O error occurspublic void add(CharSequence key, CharSequence cmd)
This method will return without executing if the cmd parameter's length is 0.
public Trie reduce(Reduce by)
public void printInfo(CharSequence prefix)
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.