public class NodeSpecificHasherBase extends NodeSpecificHasher
Modifier and Type | Field and Description |
---|---|
protected boolean |
myForIndexing |
Constructor and Description |
---|
NodeSpecificHasherBase(DuplocatorSettings settings,
FragmentsCollector callback,
DuplicatesProfileBase duplicatesProfile) |
NodeSpecificHasherBase(DuplocatorSettings settings,
FragmentsCollector callback,
DuplicatesProfileBase duplicatesProfile,
boolean forIndexing) |
Modifier and Type | Method and Description |
---|---|
boolean |
areNodesEqual(PsiElement node1,
PsiElement node2)
This is dual function to getNodeCost, checks whether 2 nodes with same costs are really equal
|
boolean |
areTreesEqual(PsiElement root1,
PsiElement root2,
int discardCost) |
boolean |
checkDeep(PsiElement node1,
PsiElement node2) |
DuplicatesProfileBase |
getDuplicatesProfile() |
java.util.List<PsiElement> |
getNodeChildren(PsiElement node)
List all of the nodes to process within TreeComparator
|
int |
getNodeCost(PsiElement node)
Used in TreeComparator and TreeHashers
|
NodeFilter |
getNodeFilter() |
int |
getNodeHash(PsiElement node)
getNodeHash is called on each node, which was returned by getNodeChildren method
|
void |
hashingFinished()
Is not invoked when index is used
|
void |
visitNode(PsiElement node) |
public NodeSpecificHasherBase(DuplocatorSettings settings, FragmentsCollector callback, DuplicatesProfileBase duplicatesProfile)
public NodeSpecificHasherBase(DuplocatorSettings settings, FragmentsCollector callback, DuplicatesProfileBase duplicatesProfile, boolean forIndexing)
public NodeFilter getNodeFilter()
public int getNodeHash(PsiElement node)
NodeSpecificHasher
getNodeHash
in class NodeSpecificHasher
public int getNodeCost(PsiElement node)
NodeSpecificHasher
getNodeCost
in class NodeSpecificHasher
public java.util.List<PsiElement> getNodeChildren(PsiElement node)
NodeSpecificHasher
getNodeChildren
in class NodeSpecificHasher
public boolean areNodesEqual(PsiElement node1, PsiElement node2)
NodeSpecificHasher
areNodesEqual
in class NodeSpecificHasher
public boolean areTreesEqual(PsiElement root1, PsiElement root2, int discardCost)
areTreesEqual
in class NodeSpecificHasher
public DuplicatesProfileBase getDuplicatesProfile()
public boolean checkDeep(PsiElement node1, PsiElement node2)
checkDeep
in class NodeSpecificHasher
public void visitNode(PsiElement node)
public void hashingFinished()
DuplocateVisitor
DuplicatesProfile.supportIndex()