| com.google.gwt.user.client.ui.PrefixTree
PrefixTree | class PrefixTree extends AbstractCollection (Code) | | A prefix tree (aka trie).
|
prefixLength | final protected int prefixLength(Code) | | Stores the requested prefix length.
|
size | protected int size(Code) | | Store the number of elements contained by this PrefixTree and its
sub-trees.
|
PrefixTree | public PrefixTree()(Code) | | Constructor.
|
PrefixTree | public PrefixTree(Collection<String> source)(Code) | | Constructor.
Parameters: source - Initialize from another collection |
PrefixTree | public PrefixTree(int prefixLength)(Code) | | Constructor.
Parameters: prefixLength - Smaller prefix length equals faster, more directsearches, at a cost of setup time. |
PrefixTree | public PrefixTree(int prefixLength, Collection<String> source)(Code) | | Constructor.
Parameters: prefixLength - Smaller prefix length equals faster, more directsearches, at a cost of setup time. Parameters: source - Initialize from another collection |
add | native public boolean add(String s)(Code) | | Add a String to the PrefixTree.
Parameters: s - The data to add true if the string was added, false otherwise |
clear | native public void clear()(Code) | | Initialize native state.
|
createPrefixTree | protected static PrefixTree createPrefixTree(int prefixLength)(Code) | | Used by native methods to create an appropriately blessed PrefixTree.
Parameters: prefixLength - Smaller prefix length equals faster, more directsearches, at a cost of setup time a newly constructed prefix tree |
getSuggestions | public List<String> getSuggestions(String search, int limit)(Code) | | Retrieve suggestions from the PrefixTree. The number of items returned from
getSuggesstions may slightly exceed limit so that all
suffixes and partial stems will be returned. This prevents the search space
from changing size if the PrefixTree is used in an interactive manner.
The returned List is guaranteed to be safe; changing its contents
will not affect the PrefixTree.
Parameters: search - The prefix to search for Parameters: limit - The desired number of results to retrieve A List of suggestions |
size | public int size()(Code) | | Get the number of all elements contained within the PrefixTree.
the size of the prefix tree |
|
|