Returns the items of the collections that do not match the specified array.

@param array $values

@return self
330542
public function except(array $values): self
    {
        return $this->filter(function ($value) use ($values) {
            return !in_array($value, $values);
        });
    }
1082825
public function setAllValues(array $values)
    {
        foreach ($values as $key => $value) {
            $this->$key = $value;
        }

        return $this;
    }
132886
public function setMany(array $values)
    {
        if ($this->getResource()) {
            foreach ($values as $key => $value) {
                $this->set($key, $value);
            }
        }
        return $this;
    }
199598
public function unshift(...$values): Sequence
    {
        $this->resolver->values(function (\DS\Map $values): void {
            $this->items->unshift(...$values->values());
        }, $values);

        return $this;
    }
458204
public function values(array $values = [])
    {
        $values = array_combine(array_map([$this, 'trimName'], array_keys($values)), array_values($values));
        $this->values = $values;
        return $this;
    }
1057192
public function pushAll(array $values): self
    {
        foreach ($values as $value) {
            $this->push($value);
        }

        return $this;
    }
609047
protected function detectValues($values): array
    {
        if (!is_array(reset($values))) {
            $values = [$values];
        } else {
            foreach ($values as $key => $value) {
                ksort($value);
                $values[$key] = $value;
            }
        }

        return $values;
    }
464960
public static function notIn($values)
    {
        if ($values instanceof Arrayable) {
            $values = $values->toArray();
        }

        return new Rules\NotIn(is_array($values) ? $values : func_get_args());
    }
308147
public function pullAll(array $values)
    {
        $this->requiresCurrentField();
        $this->newObj['$pullAll'][$this->currentField] = $values;
        return $this;
    }
752826
protected function getArrayableItems(array $values)
    {
        if (count($this->visible) > 0) {
            return array_intersect_key($values, array_flip($this->visible));
        }

        return array_diff_key($values, array_flip($this->hidden));
    }
871740
public function filterCategoryValues($values)
    {
        return array_unique(preg_split(
            '/\s*,\s*/u',
            preg_replace('/\s+/u', ' ', is_array($values) ? implode(',', $values) : $values),
            -1,
            PREG_SPLIT_NO_EMPTY
        ));
    }
1134972
public function arrayToMultiselect(array $values)
    {
        // First clean the array
        foreach ($values as $k => $v) {
            if (empty($v)) {
                unset($values[$k]);
            }
        }

        // Encode
        $values = (empty($values) ? '^^' : encodeMultienumValue($values));

        // Then return the array
        return $values;
    }
93966
public function selected($values)
    {
        if (is_array($values) || $values instanceof Closure) {
            $this->selected = $values;
        }
        else if (func_num_args() > 1) {
            $this->selected = func_get_args();
        } else {
            $this->selected = [$values];
        }

        return $this;
    }
490347
public function removeValues(array $values = [])
    {
        $this->assertCanHaveMultipleValues();

        foreach ($values as $value) {
            $this->removeValue($value);
        }

        return $this;
    }
924001
public function filter($values)
    {
        if (is_array($values)) {
            foreach ($values as $key => $value) {
                $values[$key] = $this->filterValue($value);
            }
        }

        return $values;
    }
409528
public function setItems($values)
    {
        $this->setAttribute('items', []);

        foreach ($values as $value) {
            $this->addItem($value);
        }

        return $this;
    }
243125
public function setValues(array $values)
    {
        $this->values = array();
        foreach ($values as $value) {
            $this->addValue($value);
        }
        return $this;
    }