class BidirPathExtractor {

    protected Path extract(SPTEntry fwdEntry, SPTEntry bwdEntry, double weight) {
        if (fwdEntry == null || bwdEntry == null) {
            // path not found
            return path;
        }
        if (fwdEntry.adjNode != bwdEntry.adjNode)
            throw new IllegalStateException("forward and backward entries must have same adjacent nodes, fwdEntry:" + fwdEntry + ", bwdEntry:" + bwdEntry);

        StopWatch sw = new StopWatch().start();
        extractFwdPath(fwdEntry);
        processMeetingPoint(fwdEntry, bwdEntry);
        extractBwdPath(bwdEntry);
        setExtractionTime(sw.stop().getNanos());
        path.setFound(true);
        path.setWeight(weight);
        return path;
    }

    protected  BidirPathExtractor(Graph graph, Weighting weighting);

}