Create an empty path.

<p>By default this function invokes the path factory
passed as parameter of the constructor.

@param startPoint is the first point in the path.
@param segment is the first connection to follow.
@return the path instance.
14652
@SuppressWarnings({ "unchecked", "rawtypes" })
	@Pure
	protected GP newPath(PT startPoint, ST segment) {
		if (this.pathFactory != null) {
			return this.pathFactory.newPath(startPoint, segment);
		}
		try {
			return (GP) new GraphPath(segment, startPoint);
		} catch (Throwable e) {
			throw new IllegalStateException(Locale.getString("E2"), e); //$NON-NLS-1$
		}
	}
1075831
public static Point projectPoint(Geometry point, Geometry geometry) {
        if (point == null || geometry==null) {
            return null;
        }
        if (point.getDimension()==0 && geometry.getDimension() == 1) {
            LengthIndexedLine ll = new LengthIndexedLine(geometry);
            double index = ll.project(point.getCoordinate());
            return geometry.getFactory().createPoint(ll.extractPoint(index));
        } else {
            return null;
        }
    }
954538
public static Gateway createGateway() {
        Gateway gateway = null;
        for (GatewayCreator factory : loader) {
            gateway = factory.createGateway(gateway);
            factory.configureGateway(gateway);
        }

        if (gateway == null) {
            throw new RuntimeException("Failed to load GatewayCreator implementation class.");
        }

        return gateway;
    }
702494
public Endpoint getOrCreateEndpoint(TestContext context) {
        if (endpoint != null) {
            return endpoint;
        } else if (StringUtils.hasText(endpointUri)) {
            endpoint = context.getEndpointFactory().create(endpointUri, context);
            return endpoint;
        } else {
            throw new CitrusRuntimeException("Neither endpoint nor endpoint uri is set properly!");
        }
    }
1139224
public static void path(@NotNull String path, @NotNull EndpointGroup endpointGroup) {
        path = path.startsWith("/") ? path : "/" + path;
        pathDeque.addLast(path);
        endpointGroup.addEndpoints();
        pathDeque.removeLast();
    }
1185720
function(startPoint, endPoint) {
                startPoint = vector.create(startPoint).to3D();
                endPoint = vector.create(endPoint).to3D();
                if (startPoint === null || endPoint === null) { return null; }
                this.line = line.create(startPoint, endPoint.subtract(startPoint));
                this.start = startPoint;
                this.end = endPoint;
                return this;
              }
501717
@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;
	}
401069
public PathAddress subAddress(int start) {
        final List<PathElement> list = pathAddressList;
        return new PathAddress(list.subList(start, list.size()));
    }
360863
@Override
    public CompletableFuture<Void> createSegment(@NonNull String segmentName, Duration timeout) {
        Exceptions.checkNotClosed(this.closed.get(), this);
        val attributes = TableAttributes.DEFAULT_VALUES
                .entrySet().stream()
                .map(e -> new AttributeUpdate(e.getKey(), AttributeUpdateType.None, e.getValue()))
                .collect(Collectors.toList());
        return this.segmentContainer.createStreamSegment(segmentName, attributes, timeout);
    }
1086775
private Path getFilePath(String segmentName, long epoch) {
        Preconditions.checkState(segmentName != null && segmentName.length() > 0, "segmentName must be non-null and non-empty");
        Preconditions.checkState(epoch >= 0, "epoch must be non-negative " + epoch);
        return new Path(String.format(NAME_FORMAT, getPathPrefix(segmentName), epoch));
    }
1371628
public static final Segment encode(final SegmentId segment) {
        Preconditions.checkNotNull(segment, "segment");
        return new Segment(segment.getStreamInfo().getScope(),
                segment.getStreamInfo().getStream(),
                segment.getSegmentId());
    }
1057099
@Override
    public URLConnection openConnection(URL url) throws IOException {
        if (url.getPath() == null || url.getPath().trim().length() == 0) {
            throw new MalformedURLException("Path can not be null or empty. Syntax: " + SYNTAX );
        }
        bpmnXmlURL = new URL(url.getPath());

        logger.log(Level.FINE, "BPMN xml URL is: [" + bpmnXmlURL + "]");
        return new Connection(url);
    }
382873
public static File file(String path) {
		if (StrUtil.isBlank(path)) {
			throw new NullPointerException("File path is blank!");
		}
		return new File(getAbsolutePath(path));
	}
302667
function(arg) {

            var segments = this.segments;
            var numSegments = segments.length;
            // works even if path has no segments

            var currentSegment;

            var previousSegment = ((numSegments !== 0) ? segments[numSegments - 1] : null); // if we are appending to an empty path, previousSegment is null
            var nextSegment = null;

            if (!Array.isArray(arg)) { // arg is a segment
                if (!arg || !arg.isSegment) throw new Error('Segment required.');

                currentSegment = this.prepareSegment(arg, previousSegment, nextSegment);
                segments.push(currentSegment);

            } else { // arg is an array of segments
                if (!arg[0].isSegment) throw new Error('Segments required.');

                var n = arg.length;
                for (var i = 0; i < n; i++) {

                    var currentArg = arg[i];
                    currentSegment = this.prepareSegment(currentArg, previousSegment, nextSegment);
                    segments.push(currentSegment);
                    previousSegment = currentSegment;
                }
            }
        }
331508
public DbxEntry./*@Nullable*/Folder createFolder(String path)
        throws DbxException
    {
        DbxPathV1.checkArgNonRoot("path", path);

        String[] params = {
            "root", "auto",
            "path", path,
        };

        return doPost(host.getApi(), "1/fileops/create_folder", params, null, new DbxRequestUtil.ResponseHandler<DbxEntry./*@Nullable*/Folder>() {
            @Override
            public DbxEntry./*@Nullable*/Folder handle(HttpRequestor.Response response)
                throws DbxException
            {
                if (response.getStatusCode() == 403) return null;
                if (response.getStatusCode() != 200) throw DbxRequestUtil.unexpectedStatus(response);
                return DbxRequestUtil.readJsonFromResponse(DbxEntry.Folder.Reader, response);
            }
        });
    }
57695
@Pure
	@SuppressWarnings("checkstyle:nestedifdepth")
	List<AStarNode<ST, PT>> findPath(AStarNode<ST, PT> startPoint, PT endPoint) {
		final CloseComparator<ST, PT> cComparator = new CloseComparator<>();
		final OpenComparator<ST, PT> oComparatorWithoutRef = new OpenComparator<>();
		final List<AStarNode<ST, PT>> openList = new ArrayList<>();
		final List<AStarNode<ST, PT>> closeList = new ArrayList<>();

		openList.add(startPoint);
		fireNodeOpened(startPoint, openList);

		int idx;
		AStarNode<ST, PT> candidate;
		AStarNode<ST, PT> ocandidate;
		AStarNode<ST, PT> reachableCandidate;
		AStarNode<ST, PT> reachedCandidate;
		PT reachableNode;
		PT node;
		double gCost;
		double h1;
		boolean foundTarget = false;

		while (!foundTarget && !openList.isEmpty()) {

			ocandidate = openList.remove(0);
			fireNodeConsumed(ocandidate, openList);

			candidate = translateCandidate(endPoint, ocandidate);
			foundTarget = candidate == null;

			if (!foundTarget) {
				assert candidate != null;
				node = candidate.getGraphPoint();
				// Update the nodes that are reachable from the current candidate.
				for (final ST segment : candidate.getGraphSegments()) {
					reachableNode = segment.getOtherSidePoint(node);
					if (reachableNode != null && !reachableNode.equals(node)) {
						gCost = candidate.getCost()
								+ computeCostFor(node)
								+ computeCostFor(segment);
						h1 = estimate(reachableNode, endPoint);
						reachableCandidate = newAStarNode(reachableNode, gCost, h1, segment);

						// Reopen node if better cost
						idx = (isClosedNodeReopeningEnabled())
								? ListUtil.indexOf(closeList, cComparator, reachableCandidate)
										: -1;
						if (idx >= 0) {
							reachedCandidate = closeList.get(idx);
							if (gCost < reachedCandidate.getCost()) {
								closeList.remove(idx);
								final AStarNode<ST, PT> nn = node(
										reachableNode,
										gCost,
										h1,
										segment);
								ListUtil.add(
										openList,
										oComparatorWithoutRef,
										nn,
										true, false);
								fireNodeOpened(nn, openList);
							}
						} else {
							idx = openList.indexOf(reachableCandidate);
							if (idx >= 0) {
								// Rearrange open list if better cost
								reachedCandidate = openList.get(idx);
								if ((gCost + h1) < reachedCandidate.getPathCost()) {
									openList.remove(idx);
									final AStarNode<ST, PT> nn = node(
											reachableNode,
											gCost,
											h1,
											segment);
									ListUtil.add(openList,
											oComparatorWithoutRef,
											nn,
											true, false);
									fireNodeReopened(nn, openList);
								}
							} else {
								// Node was neither treated nor seen, add it
								final AStarNode<ST, PT> nn = node(
										reachableNode,
										gCost,
										h1,
										segment);
								ListUtil.add(openList,
										oComparatorWithoutRef,
										nn,
										true, false);
								fireNodeOpened(nn, openList);
							}
						}
					}
				}
			}

			// Refresh the close list
			idx = ListUtil.add(closeList, cComparator, ocandidate, false, true);
			fireNodeClosed(ocandidate, closeList);
			assert idx >= 0;
		}

		return closeList;
	}
1336665
def help_center_user_segment_create(self, data, **kwargs):
        ""
        api_path = "/api/v2/help_center/user_segments.json"
        return self.call(api_path, method="POST", data=data, **kwargs)