protected final OsmLink clear(final OsmNode source) {
        final OsmLink n;
        if (n2 != null && n2 != source) {
            n = next;
            next = null;
            n2 = null;
            firstlinkholder = null;
        } else if (n1 != null && n1 != source) {
            n = previous;
            previous = null;
            n1 = null;
            reverselinkholder = null;
        } else {
            throw new IllegalArgumentException("internal error: setNext: unknown source");
        }
        if (n1 == null && n2 == null) {
            descriptionBitmap = null;
            geometry = null;
        }
        return n;
    }
Reset this link for the given direction
main/src/main/java/cgeo/geocaching/brouter/mapaccess/OsmLink.java