Skip to content
Snippets Groups Projects
Commit de06b821 authored by Michael Lee's avatar Michael Lee
Browse files

Modify SuffixTrie.startNewMatch to match spec

This commit changes the javadoc for SuffixTrie.startNewMatch to
correspond with the return value behavior the spec listed.
parent a388970b
No related branches found
No related tags found
No related merge requests found
......@@ -51,9 +51,9 @@ public class SuffixTrie extends HashTrieMap<Byte, ByteString, Boolean> {
* Then, the longest match is "abc", but this isn't a complete word in the trie.
* There is definitely a match; it's just a partial one.
*
* Regardless if you found a complete match or a partial match, you should return
* the total number of bytes you've matched against the buffer.
*
* If you find a COMPLETE match, you should return the total number of bytes you've
* matched against the buffer. Otherwise, you should return zero.
*
* When implementing this method, you should start by resetting this.lastMatchedNode,
* then start traversing from the root of the trie to try finding the new match. You
* should not traverse starting from the old value of this.lastMatchedNode. Make sure
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment