|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sonar.duplications.detector.suffixtree.Search.Collector org.sonar.duplications.detector.suffixtree.DuplicationsCollector
public class DuplicationsCollector
Implementation of Search.Collector
, which constructs CloneGroup
s.
Constructor Summary | |
---|---|
DuplicationsCollector(TextSet text)
|
Method Summary | |
---|---|
void |
endOfGroup()
Constructs CloneGroup and saves it. |
List<CloneGroup> |
getResult()
|
void |
part(int start,
int end)
Constructs ClonePart and saves it for future processing in endOfGroup() . |
void |
startOfGroup(int size,
int length)
Invoked at the beginning of processing for current node. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DuplicationsCollector(TextSet text)
Method Detail |
---|
public List<CloneGroup> getResult()
public void startOfGroup(int size, int length)
Search.Collector
Length - is a depth of node. And nodes are visited in descending order of depth, thus we guaranty that length will not increase between two sequential calls of this method (can be equal or less than previous value).
size
- number of parts in grouplength
- length of each part in grouppublic void part(int start, int end)
endOfGroup()
.
start
- number of first block from text for this partend
- number of last block from text for this partlen
- number of blocks in this partpublic void endOfGroup()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |