docs: @Pure
  	GP createPath(AStarNode<ST, PT> startPoint, PT endPoint, List<AStarNode<ST, PT>> closeList) {
  		int idx;
  		ST segment;
  		PT point;
  		AStarNode<ST, PT> node;
  		GP path = null;
  		final CloseComparator<ST, PT> cComparator = new CloseComparator<>();
  
  		node = newAStarNode(endPoint, Double.NaN, Double.NaN, null);
  		idx = ListUtil.indexOf(closeList, cComparator, node);
  
  		if (idx >= 0) {
  			node = closeList.remove(idx);
  			point = node.getGraphPoint();
  			segment = node.getArrivalConnection();
  			if (point != null && segment != null) {
  				final LinkedList<ST> pathSegments = new LinkedList<>();
  				pathSegments.add(segment);
  				do {
  					point = segment.getOtherSidePoint(point);
  					node = newAStarNode(point, Double.NaN, Double.NaN, null);
  					idx = ListUtil.indexOf(closeList, cComparator, node);
  					if (idx >= 0) {
  						node = closeList.remove(idx);
  						segment = node.getArrivalConnection();
  						if (segment != null) {
  							pathSegments.add(segment);
  						}
  					} else {
  						point = null;
  						segment = null;
  					}
  				}
  				while (point != null && segment != null);
  
  				// Building of the path is done is a second step
  				// because the oriented graph cannot enable to
  				// built it during the previous step loop:
  				// isConnectedSegment replies false when tested
  				// with an arrival segment and cannot
  				// enable to go backward along the path.
  				final Iterator<ST> iterator = pathSegments.descendingIterator();
  				if (iterator.hasNext()) {
  					segment = iterator.next();
  					if (startPoint.getGraphPoint().isConnectedSegment(segment)) {
  						path = newPath(startPoint.getGraphPoint(), segment);
  						while (iterator.hasNext()) {
  							addToPath(path, iterator.next());
  						}
  					}
  				}
  			}
  		}
  
  		return path;
  	}