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)
NodeSpecificHashergetNodeHash in class NodeSpecificHasherpublic int getNodeCost(PsiElement node)
NodeSpecificHashergetNodeCost in class NodeSpecificHasherpublic java.util.List<PsiElement> getNodeChildren(PsiElement node)
NodeSpecificHashergetNodeChildren in class NodeSpecificHasherpublic boolean areNodesEqual(PsiElement node1, PsiElement node2)
NodeSpecificHasherareNodesEqual in class NodeSpecificHasherpublic boolean areTreesEqual(PsiElement root1, PsiElement root2, int discardCost)
areTreesEqual in class NodeSpecificHasherpublic DuplicatesProfileBase getDuplicatesProfile()
public boolean checkDeep(PsiElement node1, PsiElement node2)
checkDeep in class NodeSpecificHasherpublic void visitNode(PsiElement node)
public void hashingFinished()
DuplocateVisitorDuplicatesProfile.supportIndex()