@param string[]|int[]|float[] $elements

@return Set
510079
public function addAll(array $elements) : Set
    {
        $this->elements = self::sanitize(array_merge($this->elements, $elements));

        return $this;
    }
17392
public static <E extends Comparable<?>> TreeSet<E> newTreeSet(Iterable<? extends E> elements) {
		TreeSet<E> set = newTreeSet();
		for (E element : elements) {
			set.add(element);
		}
		return set;
	}
560988
public function merge($elements = []): NodeList {
        if (!is_array($elements)) {
            $elements = $elements->toArray();
        }

        return $this->newNodeList(array_merge($this->toArray(), $elements));
    }
1074751
private function hashArray( $elements )
	{
		$hashes = array();

		if ( is_array( $elements ) )
		{
			foreach ( $elements as $key => $element )
			{
				if ( is_object( $element ) )
				{
					$hash = spl_object_hash( $element ) . $key;
					$hashes[ $hash ] = $element;
				}
				else if ( is_array( $element ) )
				{
					extract( $this->hashArray( $element ) ) . $key;
					$hashes[ $hash ] = $element;
				}
				else
				{
					$hash = hash( 'sha256', $element . $key );
					$hashes[ $hash ] = $element;
				}
			}
		}
		else
		{
			$hash = hash( 'sha256', $elements );
			$hashes[ $hash ] = $elements;
		}

		return array( 'hash' => hash( 'sha256', serialize( array_keys( $hashes ) ) ), 'element_hashes' => $hashes );
	}
977301
public static function diagonal(array $elements) : self
    {
        $n = count($elements);

        if ($n < 1) {
            throw new InvalidArgumentException('Dimensionality must be'
                . ' greater than 0 on all axes.');
        }

        foreach ($elements as $element) {
            if (!is_int($element) and !is_float($element)) {
                throw new InvalidArgumentException('Diagonal element'
                    . ' must be an integer or float, '
                    . gettype($element) . ' found.');
            }
        }

        $a = [];

        for ($i = 0; $i < $n; $i++) {
            $temp = [];

            for ($j = 0; $j < $n; $j++) {
                $temp[] = $i === $j ? $elements[$i] : 0;
            }

            $a[] = $temp;
        }

        return self::quick($a);
    }
796460
public function filterElements($elements){
        $this->elementsToSearch = is_array($elements) ? $elements : [$elements];
        foreach($this->elementsToSearch as $key=>$elementName){
            $this->parseElement($elementName);
        }
        return $this->parsedElements;
    }
1245822
@SafeVarargs
	public static <E> HashSet<E> newHashSet(E... elements) {
		HashSet<E> set = new HashSet<E>();
		Collections.addAll(set, elements);
		return set;
	}
50833
public function containsAll($elements)
    {
        foreach ($elements as $element) {
            if (false === $this->contains($element)) {
                return false;
            }
        }

        return true;
    }
1263491
public function setElements(array $elements)
    {
        if (($content = $this->getContent()) instanceof ElementsInterface) {
            $content->setElements($elements);
        }

        return $this;
    }
612767
public function removeAll($elements)
    {
        if ($elements instanceof CollectionInterface) {
            $elements = $elements->toArray();
        }
        $this->elements = array_values(
            array_udiff(
                $this->elements,
                $elements,
                function ($a, $b) {
                    if ($a === $b) {
                        return 0;
                    } elseif (is_int($a) && is_object($b)) {
                        return -1;
                    } elseif (is_object($a) && is_int($b)) {
                        return 1;
                    } elseif ($a < $b) {
                        return -1;
                    } else {
                        return 1;
                    }
                }
            )
        );
        foreach ($this->subLists as $subList) {
            $subList->removeAll($elements, true);
        }
        return $this;
    }
503931
public function addAll($elements)
    {
        if ($elements instanceof CollectionInterface) {
            $elements = $elements->toArray();
        } else {
            $elements = array_values($elements);
        }
        $this->elements = array_merge($this->elements, $elements);
        return $this;
    }
841777
public function addElements(array $elements) {
		foreach ($elements as $name => $element) {
			if (is_string($name)) {
				$this->addElement($element, $name);
			} else {
				$this->addElement($element);
			}
		}
		
		return $this;
	}
1246598
public function remove(... $items) : Set
    {
        $values = $this->_removeSameAll($items);
        $this->setValues($values);
        return $this;
    }
800307
public function from($tables)
  {
    if ( is_null($this->from) ){
      $this->from = new Element('FROM', $tables);
    }
    else {
      $this->from->append($tables);
    }

    return $this;
  }
391189
protected function checkHydrationElements($elements)
    {
        $elements = countriesCollect($elements)->mapWithKeys(function ($value, $key) {
            if (is_numeric($key)) {
                $key = $value;
                $value = true;
            }

            return [$key => $value];
        })->filter(function ($element) {
            return $element;
        });

        return $elements;
    }
949215
public function push(...$elements): self
    {
        foreach ($elements as $element) {
            $this->validate($element);

            $this->elements[] = $element;
        }

        return $this;
    }
1016855
protected function inline($elements) {
		if (1 < func_num_args()) {
			$elements = func_get_args();
		}
		return
			is_array($elements)
			? array_map([$this, __FUNCTION__], $elements)
			: $elements->setRenderer(Inline::s())
		;
	}