Add a PathChain (having a non-null path) to the handler data structures.
198134
private static void addPathChain(PathChain pathChain) {
		HttpString method = new HttpString(pathChain.getMethod());

		// Use a random integer as the id for a given path.
		Integer randInt = new Random().nextInt();
		while (handlerListById.containsKey(randInt.toString())) {
			randInt = new Random().nextInt();
		}

		// Flatten out the execution list from a mix of middleware chains and handlers.
		List<HttpHandler> handlers = getHandlersFromExecList(pathChain.getExec());
		if(handlers.size() > 0) {
			// If a matcher already exists for the given type, at to that instead of
			// creating a new one.
			PathTemplateMatcher<String> pathTemplateMatcher = methodToMatcherMap.containsKey(method)
				? methodToMatcherMap.get(method)
				: new PathTemplateMatcher<>();

			if(pathTemplateMatcher.get(pathChain.getPath()) == null) { pathTemplateMatcher.add(pathChain.getPath(), randInt.toString()); }
			methodToMatcherMap.put(method, pathTemplateMatcher);
			handlerListById.put(randInt.toString(), handlers);
		}
	}
1358833
public Javalin patch(@NotNull String path, @NotNull Handler handler) {
        return addHandler(HandlerType.PATCH, path, handler);
    }
234363
def AddPathInfo(self, path_info):
    """"""

    if self._path_type != path_info.path_type:
      message = "Incompatible path types: `%s` and `%s`"
      raise ValueError(message % (self._path_type, path_info.path_type))
    if self._components != path_info.components:
      message = "Incompatible path components: `%s` and `%s`"
      raise ValueError(message % (self._components, path_info.components))

    if path_info.timestamp in self._path_infos:
      raise ValueError("PathInfo with timestamp %r was added before." %
                       path_info.timestamp)

    new_path_info = path_info.Copy()
    if new_path_info.timestamp is None:
      new_path_info.timestamp = rdfvalue.RDFDatetime.Now()
    self._path_infos[new_path_info.timestamp] = new_path_info
1091435
private void addSubtraversal(T node, LinkedList<T> imports, Set<T> alreadyIncludedImports, NodePath<T> nodePath)
      throws ExecutionException {

    if (addNodeIfNotAlreadyIncluded(node, imports, alreadyIncludedImports)) {
      for (T inheritedFromParent : doTraverseGraphRecursively(node, nodePath)) {
        addNodeIfNotAlreadyIncluded(inheritedFromParent, imports, alreadyIncludedImports);
      }
    }
  }
890517
def add(self, paths, **params):
        
        log = self._getparam('log', self._discard, **params)
        missing = self._getparam('missing', True, **params)
        commit = self._getparam('commit', True, **params)

        if type(paths) is not list:
            paths = [paths]

        rebuild = False
        for path in paths:
            if path in self.paths:
                if self.paths[path] == missing:
                    log.info("Ignoring attempt to add existing path %r", path)
                else:
                    log.debug("Changing missing state from %s to %s on existing path %r",
                            str(self.paths[path]), str(missing), path)
                    self.paths[path] = missing
            else:
                log.debug("Adding path %r", path)
                self.paths[path] = missing
                rebuild = True
        if commit and rebuild:
            self.commit(**params)
260457
public Blade post(@NonNull String path, @NonNull RouteHandler handler) {
        this.routeMatcher.addRoute(path, handler, HttpMethod.POST);
        return this;
    }
633739
public Javalin patch(@NotNull String path, @NotNull Handler handler, @NotNull Set<Role> permittedRoles) {
        return addHandler(HandlerType.PATCH, path, handler, permittedRoles);
    }
993886
def add_patch(self, path: str, handler: _WebHandler,
                  **kwargs: Any) -> AbstractRoute:
        
        return self.add_route(hdrs.METH_PATCH, path, handler, **kwargs)
448900
public static void addProvidersToPathHandler(PathResourceProvider[] pathResourceProviders, PathHandler pathHandler) {
        if (pathResourceProviders != null && pathResourceProviders.length > 0) {
            for (PathResourceProvider pathResourceProvider : pathResourceProviders) {
                if (pathResourceProvider.isPrefixPath()) {
                    pathHandler.addPrefixPath(pathResourceProvider.getPath(), new ResourceHandler(pathResourceProvider.getResourceManager()));
                } else {
                    pathHandler.addExactPath(pathResourceProvider.getPath(), new ResourceHandler(pathResourceProvider.getResourceManager()));
                }
            }
        }
    }
67859
public static void patch(@NotNull String path, @NotNull Handler handler) {
        staticInstance().patch(prefixPath(path), handler);
    }
1187853
public void add(final String path) {
        final Set<String> paths = new LinkedHashSet<String>();
        paths.addAll(get());
        paths.add(path);
        set(paths);
    }
123537
def add_path(self, path, attribs=None, group=None):
        """"""

        # If not given a parent, assume that the path does not have a group
        if group is None:
            group = self.tree.getroot()

        # If given a list of strings (one or more), assume it represents
        # a sequence of nested group names
        elif all(isinstance(elem, str) for elem in group):
            group = self.get_or_add_group(group)

        elif not isinstance(group, Element):
            raise TypeError(
                'Must provide a list of strings or an xml.etree.Element '
                'object. Instead you provided {0}'.format(group))

        else:
            # Make sure that the group belongs to this Document object
            if not self.contains_group(group):
                warnings.warn('The requested group does not belong to '
                              'this Document')

        # TODO: It might be better to use duck-typing here with a try-except
        if isinstance(path, Path):
            path_svg = path.d()
        elif is_path_segment(path):
            path_svg = Path(path).d()
        elif isinstance(path, str):
            # Assume this is a valid d-string.
            # TODO: Should we sanity check the input string?
            path_svg = path
        else:
            raise TypeError(
                'Must provide a Path, a path segment type, or a valid '
                'SVG path d-string. Instead you provided {0}'.format(path))

        if attribs is None:
            attribs = {}
        else:
            attribs = attribs.copy()

        attribs['d'] = path_svg

        return SubElement(group, 'path', attribs)
93502
public void addPath(String path) {
        if (path == null) {
            return;
        }
        String[] pathComponents = path.split("/");
        TrieNode parent = rootNode;
        String part = null;
        if (pathComponents.length <= 1) {
            throw new IllegalArgumentException("Invalid path " + path);
        }
        for (int i=1; i<pathComponents.length; i++) {
            part = pathComponents[i];
            if (parent.getChild(part) == null) {
                parent.addChild(part, new TrieNode(parent));
            }
            parent = parent.getChild(part);
        }
        parent.setProperty(true);
    }
492557
def _AddFieldPaths(node, prefix, field_mask):
  """"""
  if not node:
    field_mask.paths.append(prefix)
    return
  for name in sorted(node):
    if prefix:
      child_path = prefix + '.' + name
    else:
      child_path = name
    _AddFieldPaths(node[name], child_path, field_mask)
790829
def add_path(self, w, h):
        """"""
        custGeom = self.spPr.custGeom
        if custGeom is None:
            raise ValueError('shape must be freeform')
        pathLst = custGeom.get_or_add_pathLst()
        return pathLst.add_path(w=w, h=h)
480480
function addPathHandles($canvas, parent) {
	var key, xProp, yProp;
	for (key in parent) {
		if (Object.prototype.hasOwnProperty.call(parent, key)) {
			// If property is a control point
			if (key.match(/c?x(\d+)/gi) !== null) {
				// Get the x and y coordinates for that control point
				xProp = key;
				yProp = key.replace('x', 'y');
				// Add handle at control point
				addPathHandle($canvas, parent, xProp, yProp);
			}
		}
	}
	// Add guides connecting handles
	if (parent.guide) {
		addPathGuides($canvas, parent);
	}
}
1227951
public Javalin options(@NotNull String path, @NotNull Handler handler) {
        return addHandler(HandlerType.OPTIONS, path, handler);
    }