Check for equality that can be applied to each kind of node, to not repeat it in every method we store that here.
Implements com.github.javaparser.ast.visitor.GenericVisitor.visit.