An expectation with the logical opposite condition of the given condition.

@param WebDriverExpectedCondition $condition The condition to be negated.
@return mixed The negation of the result of the given condition.
421720
public static function not(self $condition)
    {
        return new static(
            function (WebDriver $driver) use ($condition) {
                $result = call_user_func($condition->getApply(), $driver);

                return !$result;
            }
        );
    }
483600
public function reject( $condition ) {
		return $this->filter( function ( $v, $k ) use ( $condition ) {
			return ! call_user_func( $condition, $v, $k );
		} );
	}
747332
protected function validateCondition($condition)
    {
        $condition = trim(strtolower($condition));

        if ('and' !== $condition && 'or' !== $condition) {
            throw new \Exception("Condition can only be one of: 'and', 'or'.");
        }

        return $condition;
    }
763147
public static function create($condition): self
    {
        $condition = $condition instanceof Condition ? $condition : Condition::fromValue($condition);

        return new self($condition);
    }
404598
public function clause($condition = 'AND')
    {
        if (empty($this->where)) {
            $condition = null;
        }
        $clause = new AnDomainQueryClause($this, $condition);

        return $clause;
    }
1222579
public function filter( $condition ) {
		$elements = array();

		foreach ( $this->elements as $element ) {
			if ( call_user_func( $condition, $element ) ) {
				$elements[] = $element;
			}
		}

		return $this->new_from_trusted( $elements );
	}
1000627
public function where(...$conditions) : self
    {
        $this->conditionalQueryBuilder->where(
            ...$this->createConditionExpressions($conditions)
        );

        return $this;
    }
465685
public static function generateKey($condition)
    {
        if(is_string($condition))
        {
            return $condition;
        }
        else
        {
            $rule = ModelManager::getKeyRule(static::class);
            $result = $rule->rule;
            foreach($rule->paramNames as $paramName)
            {
                if(!isset($condition[$paramName]))
                {
                    throw new \Exception(sprintf('GenerateKey param %s does not exists', $paramName));
                }
                $result = str_replace('{' . $paramName . '}', $condition[$paramName], $result);
            }
            return $result;
        }
    }
121524
protected function _evaluateCondition($condition, Event $event)
    {
        if (!isset($this->_options[$condition])) {
            return $condition !== 'unless';
        }
        if (!is_callable($this->_options[$condition])) {
            throw new RuntimeException(self::class . ' the `' . $condition . '` condition is not a callable!');
        }

        return $this->_options[$condition]($event);
    }
811522
public function setCondition(array $condition)
    {
        if (!isset($condition['function'])) {
            return false;
        }

        $this->conditional_function = $condition['function'];

        if (isset($condition['parameters'])) {
            $this->conditional_parameters = (array) $condition['parameters'];
        }

        if (isset($condition['inverse'])) {
            $this->conditional_inverse = (boolean) $condition['inverse'];
        }
    }
1361270
public static Condition not(final Condition condition) {
    return new Condition("not " + condition.name, !condition.nullIsAllowed) {
      @Override
      public boolean apply(Driver driver, WebElement element) {
        return !condition.apply(driver, element);
      }

      @Override
      public String actualValue(Driver driver, WebElement element) {
        return condition.actualValue(driver, element);
      }
    };
  }
1147761
public function reject( $condition ) {
		$inverse = function ( $element ) use ( $condition ) {
			return ! call_user_func( $condition, $element );
		};

		return $this->filter( $inverse );
	}
419445
protected function getValue(Condition $condition)
    {
        $value = $condition->getValue();
        $type = $condition->getType();

        switch ($type) {
            case DataTypes::UNDEFINED_TYPE:
            case DataTypes::STRING_TYPE:
            case DataTypes::TAGS_TYPE:
            case DataTypes::AUTO_COMPLETE_TYPE:
                return $value;
            case DataTypes::NUMBER_TYPE:
                if (is_numeric($value)) {
                    return floatval($value);
                }

                throw new ConditionTypeMismatchException($condition->getId(), $value, $type);
            case DataTypes::BOOLEAN_TYPE:
                return $this->getBoolean($value);
            case DataTypes::DATETIME_TYPE:
                try {
                    return new \DateTime($value);
                } catch (\Exception $ex) {
                    throw new ConditionTypeMismatchException($condition->getId(), $value, $type);
                }
            default:
                throw new ConditionTypeMismatchException($condition->getId(), $value, $type);
        }
    }
1201423
public function createCondition(array $condition): ConditionInterface
    {
        foreach ($this->conditionNameToConditionClassMap as $conditionName => $conditionClass) {
            if (isset($condition[$conditionName])) {
                return new $conditionClass($condition['command'], $condition[$conditionName]);
            }
        }

        throw new ConditionNotFoundException(sprintf('Condition could not be found, available conditions are: %s', implode(', ', $this->conditionNameToConditionClassMap)));
    }
677843
protected function resolveConditionalLogic($condition)
    {
        $renderer = $this->getActionRenderer();
        if ($renderer && is_callable([ $renderer, $condition ])) {
            return !!$renderer->{$condition}();
        } elseif (is_callable([ $this, $condition ])) {
            return !!$this->{$condition}();
        } elseif (is_callable($condition)) {
            return !!$condition();
        } elseif ($renderer) {
            return !!$renderer->renderTemplate($condition);
        } elseif ($this->view()) {
            return !!$this->renderTemplate($condition);
        }

        return !!$condition;
    }
636238
private function _prepareCondition(ConditionInterface $condition = null)
	{
		$this->condition = $this->expressionBuilderFactory->create($condition)->build();
	}
607333
public function any($condition)
    {
        $this->filter($condition);

        $tmp = new \stdClass();

        return $this->getFirst($tmp) !== $tmp;
    }