public class LCSubstringSolver extends Object
ConcurrentRadixTree and combines it with elements from
ConcurrentSuffixTree, but implements its own traversal algorithm.| Constructor and Description |
|---|
LCSubstringSolver(NodeFactory nodeFactory)
Creates a new
LCSubstringSolver which will use the given NodeFactory to create nodes. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(CharSequence document)
Adds a
CharSequence document to the solver. |
protected Set<String> |
createSetForOriginalKeys() |
CharSequence |
getLongestCommonSubstring()
Finds the longest common substring in the documents added to the solver so far.
|
public LCSubstringSolver(NodeFactory nodeFactory)
LCSubstringSolver which will use the given NodeFactory to create nodes.nodeFactory - An object which creates Node objects
on-demand, and which might return node implementations optimized for storing the values supplied to it for
the creation of each nodepublic boolean add(CharSequence document)
CharSequence document to the solver.document - The CharSequence to add to the solverpublic CharSequence getLongestCommonSubstring()
Copyright © 2017. All Rights Reserved.