private void fixUpPathEnds(TrainPath p, Point newStart, Point newEnd) { Point oldStart = new Point(); Point oldEnd = new Point(); p.getHead(oldStart); p.getTail(oldEnd);
private void fixUpPathEnds(LinkedList p, Point newStart, Point newEnd) { IntLine oldStartSegment = (IntLine) p.getFirst(); IntLine oldEndSegment = (IntLine) p.getLast(); Point oldStart = new Point(oldStartSegment.x1, oldStartSegment.y1); Point oldEnd = new Point(oldEndSegment.x2, oldEndSegment.y2);
    private void fixUpPathEnds(TrainPath p, Point newStart, Point newEnd) {	Point oldStart = new Point();	Point oldEnd = new Point();	p.getHead(oldStart);	p.getTail(oldEnd);	IntLine newStartSegment = new IntLine(newStart, oldStart);	IntLine newEndSegment = new IntLine(oldEnd, newEnd);	p.prepend(new TrainPath(new IntLine[]{newStartSegment}));	p.append(new TrainPath(new IntLine[]{newEndSegment}));    }