Removes any existing path elements and sets the provided elements as the path

@param elements Path elements to set
@return this
558625
public UrlStringBuilder setPath(String... elements) {
        Validate.noNullElements(elements, "elements cannot be null");

        this.path.clear();
        this.addPath(elements);
        return this;
    }
234437
public ElementWithOptions removeOption(String value) {
        for (OptionGroup group : optionGroups.values()) {
            group.removeOption(value);
        }
        return this;
    }
1045207
public static PathFragment[] from(Filter... filters) {
        PathFragment[] ret = new PathFragment[filters.length];
        Arrays.setAll(ret, (i) -> new PathFragment(filters[i]));
        return ret;
    }
267459
public synchronized void removeElement(T element) {
		List<T> origList = ref.get().list;
		boolean isPresent = origList.contains(element);
		if (!isPresent) {
			return;
		}
		
		List<T> newList = new ArrayList<T>(origList);
		newList.remove(element);
		
		swapWithList(newList);
	}
1184917
public void setElements(List<AstNode> elements) {
        if (elements == null) {
            this.elements = null;
        } else {
            if (this.elements != null)
                this.elements.clear();
            for (AstNode e : elements)
                addElement(e);
        }
    }
999727
public static @Nonnull JsonSet set(JsonBuilder... elements) {
        JsonSet jjArray = new JsonSet();
        for (JsonBuilder b : elements) {
            jjArray.add(b);
        }
        return jjArray;
    }
866658
function (keys, preserveElems) {
            var i = 0;
            var len = keys ? keys.length : 0;
            for (i; i < len; i++) {
                this.remove(keys[i], preserveElems);
            }
            return this;
        }
1310211
public UriComponentsBuilder pathSegment(String... pathSegments) throws IllegalArgumentException {
		Assert.notNull(pathSegments, "'segments' must not be null");
		this.pathBuilder.addPathSegments(pathSegments);
		resetSchemeSpecificPart();
		return this;
	}
1053883
public Tree clear(String path) {
		Tree child = getChild(path, false);
		if (child == null) {
			child = putMap(path);
		} else {
			child.clear();
		}
		return child;
	}
1005022
public XMLWriter startElement(String element) {
        append("<" + element);
        if (rootElement && xmlns != null) {
            append(" xmlns=\"" + xmlns + "\"");
            rootElement = false;
        }
        append(">");
        elementStack.push(element);
        return this;
    }
1229194
public static Element removeScriptTags(Element element) {

        NodeList<Element> scriptTags = element.getElementsByTagName(Tag.script.name());
        // iterate backwards over list to ensure all tags get removed
        for (int i = scriptTags.getLength() - 1; i >= 0; i--) {
            scriptTags.getItem(i).removeFromParent();
        }
        return element;
    }
873267
public void setChildren(Iterable<? extends NodeInfo> children) {
        Level current = path.getLast();
        current.children.clear();
        appendChildren(children);
    }
869580
public Element merge(final Element element) {
        types.addAll(element.types);
        possibleValues.addAll(element.possibleValues);
        return this;
    }
602938
public static DocumentPath from(List<String> elements) {
    List<String> copy = new ArrayList<>();
    copy.add(ROOT_ELEMENT);
    copy.addAll(elements);
    return new DocumentPath(copy);
  }
1043181
public static function addPathElement($path, $element)
    {
        $element = (array)$element;
        array_unshift($element, rtrim($path, DIRECTORY_SEPARATOR));

        return implode(DIRECTORY_SEPARATOR, $element);
    }
49301
public void setPaths(String paths) {
                if (paths != null && paths.trim().length() > 0) {
                        String[] pathArray = paths.split(",");
                        pathList.addAll(Arrays.asList(pathArray));
                }
        }
716065
public Parameters omit(String... paths) {
		Parameters result = new Parameters(this);
		for (String path : paths)
			result.remove(path);
		return result;
	}