fr.lirmm.graphik.util.collections.Trie Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of integraal-graal-ruleset-analysis Show documentation
Show all versions of integraal-graal-ruleset-analysis Show documentation
Rule base analysis for InteGraal. This is imported from Graal
The newest version!
package fr.lirmm.graphik.util.collections;
public class Trie
{
private TrieNode root;
/**
* Constructor
*/
public Trie()
{
root = new TrieNode();
}
/**
* Associates a value to a word
*
* @param value
* @param word
*/
@SafeVarargs
public final V put(V value, T... word)
{
return root.put(value, 0, word);
}
/**
* Get the value in the Trie with the given
* word
*
* @param word
* @return the associated value, or null if there is no value associated.
*/
@SafeVarargs
public final V get(T... word)
{
return root.get(0, word);
}
}