return;
}
while (!searchStack.isEmpty()) {
if (neighborIterator == null || !neighborIterator.hasNext()) {
IndexedWord search = searchStack.pop();
neighborIterator = neighborIterator(sg, search);
}
while (neighborIterator.hasNext()) {
SemanticGraphEdge edge = neighborIterator.next();
IndexedWord otherEnd = followEdge(edge);
if (!searchedNodes.contains(otherEnd)) {
searchStack.push(otherEnd);
searchedNodes.add(otherEnd);
}
if (type.test(edge.getRelation().toString()) && !matchedNodes.contains(otherEnd)) {