public void collectOutreachers() {
        nodes2check = new ArrayList<>(nodesCreated);
        nodesCreated = 0;
        for (OsmNode n : hmap.values()) {
            addActiveNode(nodes2check, n);
        }

        lastVisitID++;
        baseID = lastVisitID;

        while (!nodes2check.isEmpty()) {
            final OsmNode n = nodes2check.remove(nodes2check.size() - 1);
            n.visitID = lastVisitID;

            for (OsmLink l = n.firstlink; l != null; l = l.getNext(n)) {
                final OsmNode t = l.getTarget(n);
                if (t.visitID != lastVisitID) {
                    addActiveNode(nodes2check, t);
                }
            }
            if (destination != null && currentMaxCost < 1000000000) {
                final int distance = n.calcDistance(destination);
                if (distance > currentMaxCost - currentPathCost + 100) {
                    n.vanish();
                }
            }
            if (n.firstlink == null) {
                nodesCreated--;
            }
        }
    }
Container for link between two Osm nodes

@author ab
main/src/main/java/cgeo/geocaching/brouter/mapaccess/OsmNodesMap.java