{@inheritdoc}

@param callable $condition Conditional callback.

@return DictionaryContract
341297
public function filter( $condition ) {
		$storage = array();

		foreach ( $this->storage as $key => $value ) {
			if ( call_user_func( $condition, $value, $key ) ) {
				$storage[ $key ] = $value;
			}
		}

		return new static( $this->get_key_type(), $this->get_value_type(), $storage );
	}
1082402
public function nest(Closure $callback, $condition)
    {
        $topic = new static();

        $callback($topic);
        if (count($topic->conditions)) {
            $open_parenthesis = '(';
            $topic = $topic->conditions;
            $close_parenthesis = ')';

            $this->conditions[] = compact('condition', 'open_parenthesis', 'topic', 'close_parenthesis');
        }

        return $this;
    }
870717
public static function addCondition($condition)
    {
        $ret = ' ';

        if (!empty($condition)) {
            if (is_array($condition)) {
                $ret .= ' AND (( ' . implode(" )\nAND (", $condition) . ' ))';
            } else {
                $ret .= ' AND ( ' . $condition . ' )';
            }
        }

        return $ret;
    }
1319004
public function pull(string $field, $condition)
    {
        $this->update();
        $this->mongoDbUpdate['$pull'][$field] = $condition;

        return $this;
    }
1261441
public function on($condition){
        JoinOnImpl::on($this->context, $condition);
        return new JoinRule($this->context);
    }
857495
public function findOne(Condition $condition)
    {
        $result = null;
        $row = $this->microDb->getCollection($this->collectionName)->fetchOne(
            $this->conditionParser->filter($condition),
            $this->conditionParser->sort($condition)
        );
        if ($row) {
            /** @var AbstractEntity $result */
            $result = $this->factory->create();
            $result->mapFromArray($row);
        }

        return $result;
    }
168809
private function buildCondition($condition) 
    {
        $where = '';
        
        foreach($condition as $filter) {
            switch(count($filter)) {
                case 1:
                $where .= ' ' . $this->validateLogicalOperator(($filter[0])) . ' ';
                break;
                case 3:
                $where .= $this->quoteColumnName($filter[1]) .' '. $this->validateComparisonOperators($filter[0]) .' '. $this->handleThridParameter($filter[2]);
                break;
                case 4:
                $where .= $this->quoteColumnName($filter[1]) .' '. $this->validateComparisonOperators($filter[0]) .' '. $this->quoteValue($filter[2]) . ' AND ' . $this->quoteValue($filter[3]);
                break;
            }
        }
        
        return $where;
    }
1346529
public function where($key, $condition)
    {
        $this->conditions[$key] = self::$conditionRegex[$condition];
        return $this;
    }
586913
public function orHavingRaw(string $condition): self
    {
        $this->condition->orHaving([new RawExp($condition)]);

        return $this;
    }
356662
public function addConditions(array $conditions = array())
    {
        foreach ($conditions as $key => $condition) {
            if (is_array($condition)) {
                call_user_func_array(array($this, 'addCondition'), $condition);
            } elseif (!$this->getBuilder()->getHelper()->isNumber($key)) {
                call_user_func_array(array($this, 'addCondition'), array($key, $condition));
            } else {
                $this->addCondition($condition);
            }
        }

        return $this;
    }
179370
public function where(string ...$condition) : self
    {
        // We want to wipe out anything already in the condition list
        $this->whereConditions = [];
        $this->whereConditions = $this->addConditionToClause(
            $this->whereConditions, 'AND', ...$condition);

        return $this;
    }
590525
public function addCondition( $condition )
	{
		if( is_array( $condition ) )
			return $this->addConditions( $condition );
		if( in_array( $condition, $this->conditions ) )
			return FALSE;
		$this->conditions[] = $condition;
		return TRUE;
	}
1331123
public function parse(ActivationInterface $condition)
    {
        $rootNode = null;
        $this->resetParser($condition);

        if (false === $condition instanceof EmptyActivation) {
            try {
                $rootNode = $this->getNodeRecursive();
            } catch (ConditionParserException $exception) {
                $error = new Error($exception->getMessage(), $exception->getCode());
                $this->result->addError($error);
            }
        }

        $rootNode = $rootNode ?: NullNode::get();

        /** @var ConditionTree $tree */
        $tree = GeneralUtility::makeInstance(ConditionTree::class, $rootNode, $this->result);

        return $tree;
    }
902486
public function filterOne(array $condition)
	{
		$p = $this->getPlaceholder();

		foreach ($condition as $column => $value) {
			$c = $this->checkAliases($column);

			$this->data_source->andWhere("$c = :$p")
				->setParameter($p, $value);
		}

		return $this;
	}
88268
private function moveWithCondition(callable $condition, $direction = self::DIR_FORWARD)
    {
        while ($condition()) {
            $this->move($direction);

            if (!$this->valid()) {
                throw $this->getOutOfBoundsException();
            }
        }

        return $this;
    }
42210
private static function filterCondition($condition)
    {
        foreach($condition as $k => $v) {
            if (is_array($v)) {
                $condition[$k] = array_values($v);
                foreach($v as $vv) {
                    if (is_array($vv)) {
                        throw new InvalidArgumentException('Nested arrays are not allowed in condition for findAll() and findOne().');
                    }
                }
            }
        }
        return $condition;
    }
1306736
protected function processTokenCondition($condition)
    {
        if (false === $this->condition->hasCondition($condition)) {
            $this->addError('The condition "' . $condition . '" does not exist.', self::ERROR_CODE_CONDITION_NOT_FOUND);
        } else {
            $node = new ConditionNode($condition, $this->condition->getCondition($condition));
            $this->scope
                ->setNode($node)
                ->shiftExpression();
        }
    }