private static void addLinks(final OsmNode[] nodes, final int idx, final boolean isBorder, final int[] links) {
        final OsmNode n = nodes[idx];
        n.visitID = isBorder ? 1 : 0;
        n.selev = (short) idx;
        for (int i : links) {
            final OsmNode t = nodes[i];
            OsmLink link = n.isLinkUnused() ? n : (t.isLinkUnused() ? t : null);
            if (link == null) {
                link = new OsmLink();
            }
            n.addLink(link, false, t);
        }
    }
Container for link between two Osm nodes

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