Add a condition.
@param condition the condition to be added
189698
public void addCondition(final Condition condition) {
        if (conditions_ == null) {
            conditions_ = new ArrayList<>();
        }
        conditions_.add(condition);
    }
647200
public Optional<AlertCondition> update(AlertCondition condition)
    {
        return HTTP.PUT(String.format("/v2/alerts_conditions/%d.json", condition.getId()), condition, ALERT_CONDITION);
    }
559607
public void add(Collection<NrqlAlertCondition> conditions)
    {
        for(NrqlAlertCondition condition : conditions)
            this.conditions.put(condition.getId(), condition);
    }
68787
protected void addIdInCollectionCondition(final Expression<?> property, final Collection<?> values) {
        if (values == null || values.isEmpty()) {
            fieldConditions.add(getCriteriaBuilder().equal(property, -1));
        } else {
            fieldConditions.add(property.in(values));
        }
    }
974484
def add_condition(self, condition: z3.BoolRef) -> None:
        
        variables = set(_get_expr_variables(condition))
        relevant_buckets = set()
        for variable in variables:
            try:
                bucket = self.variable_map[str(variable)]
                relevant_buckets.add(bucket)
            except KeyError:
                continue

        new_bucket = DependenceBucket(variables, [condition])
        self.buckets.append(new_bucket)

        if relevant_buckets:
            # Merge buckets, and rewrite variable map accordingly
            relevant_buckets.add(new_bucket)
            new_bucket = self._merge_buckets(relevant_buckets)

        for variable in new_bucket.variables:
            self.variable_map[str(variable)] = new_bucket
1252836
public function condition($condition)
    {
        $reference = $this;

        if (count($this->conditions) !== 0) {
            ob_end_clean();
        }

        $reference->saveCondition($condition, ''); /// so above count fires after first pass

        ob_start(function ($data) use ($condition, $reference) {
            $reference->saveCondition($condition, $data);
        });
    }
399247
public void addValue(String value)
    {
        if(this.values == null)
            this.values = new ArrayList<String>();
        this.values.add(value);
    }
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'];
        }
    }
1007375
private void writeConditions(List<Condition> conditions)
            throws JsonGenerationException, IOException {
        Map<String, ConditionsByKey> conditionsByType = groupConditionsByTypeAndKey(conditions);

        writeJsonObjectStart(JsonDocumentFields.CONDITION);

        ConditionsByKey conditionsByKey;
        for (Map.Entry<String, ConditionsByKey> entry : conditionsByType
                .entrySet()) {
            conditionsByKey = conditionsByType.get(entry.getKey());

            writeJsonObjectStart(entry.getKey());
            for (String key : conditionsByKey.keySet()) {
                writeJsonArray(key, conditionsByKey.getConditionsByKey(key));
            }
            writeJsonObjectEnd();
        }
        writeJsonObjectEnd();
    }
215757
@SuppressWarnings("unchecked")
    public static Condition composite(Condition... conditions) {
        Condition init = alwaysTrue();

        for (Condition condition : conditions) {
            Predicate<Call> newPredicate = Predicates.and(init.getPredicate(), condition.getPredicate());
            if (condition instanceof ConditionWithApplicables) {
                init = new ConditionWithApplicables(newPredicate, ((ConditionWithApplicables) condition).getApplicables());
            } else {
                init = Condition.custom(newPredicate);
            }
        }

        return init;
    }
1287960
public function addFilter($filter, $condition = 'AND') {
        if ($this->searchParams->filter == null) {
            $this->searchParams->filter = $filter;
        } else {
            $this->searchParams->filter .= " {$condition} $filter";
        }
    }
509521
public static void addAction(Set<Action> aas, Action action, boolean condition) {

        if (condition) {
            aas.add(action);
        }
    }
831752
public function addCondition(Condition\Condition $condition)
    {
        if ($this->qb->queryClass === GetItem::class) {
            throw ODMException::queryGetOperationConditionsNotSupported();
        }

        $this->condition->add($condition);

        return $this;
    }
663661
public function add($parameters, $condition = null)
    {
        if (is_array($parameters)) {
            foreach ($parameters as $parameter => $condition) {
                $this->add($parameter, $condition);
            }

            return;
        }

        return $this->register($parameters, $condition);
    }
673745
private void paintCondition(final Condition condition, final XmlStringBuilder xml) {
		if (condition instanceof And) {
			xml.appendTag("ui:and");

			for (Condition operand : ((And) condition).getConditions()) {
				paintCondition(operand, xml);
			}

			xml.appendEndTag("ui:and");
		} else if (condition instanceof Or) {
			xml.appendTag("ui:or");

			for (Condition operand : ((Or) condition).getConditions()) {
				paintCondition(operand, xml);
			}

			xml.appendEndTag("ui:or");
		} else if (condition instanceof Not) {
			xml.appendTag("ui:not");
			paintCondition(((Not) condition).getCondition(), xml);
			xml.appendEndTag("ui:not");
		} else if (condition instanceof AbstractCompare) {
			AbstractCompare compare = (AbstractCompare) condition;
			xml.appendTagOpen("ui:condition");
			xml.appendAttribute("controller", compare.getTrigger().getId());
			xml.appendAttribute("value", compare.getComparePaintValue());
			xml.appendOptionalAttribute("operator", getCompareTypeName(compare.getCompareType()));
			xml.appendEnd();
		} else {
			throw new SystemException("Unknown condition: " + condition);
		}
	}
1210705
private function addCondition($key, $condition, $value)
    {
        if (!isset($this->where[$key]))
        {
            $this->where[$key] = array();
        }
        $this->where[$key][$condition] = AVClient::_encode($value, true);
    }
201248
def register_condition(self, *args, **kwds):
    
    if len(args) == 1 and len(kwds) == 0 and callable(args[0]):
      return self._add_condition(args[0])
    else:
      return partial(self._add_condition, *args, **kwds)