public function is($filter): bool
    {
        if ($filter instanceof Entity) {
            return $this->isSameAsEntity($filter);
        }

        if (is_associative_array($filter)) {
            return $this->matchesFilter($filter);
        }

        return $this->matchedId($filter);
    }