Create a description for a NelsonCondition object.

@param condition the condition
@return a description to be used on email templates
546424
public String nelson(NelsonCondition condition) {
        String description;
        if (condition.getContext() != null && condition.getContext().get(CONTEXT_PROPERTY_DESCRIPTION) != null) {
            description = condition.getContext().get(CONTEXT_PROPERTY_DESCRIPTION);
        } else {
            description = condition.getDataId();
        }
        description += " violates one or the following Nelson rules: " + condition.getActiveRules();
        return description;
    }
1371456
public String[] getConditionInfos() {
        String[] conds = new String[conditions.size()];
        synchronized (conditions) {
            int i = 0;
            for (Iterator iterator = this.conditions.iterator(); iterator.hasNext(); i++) {
                IObjectReference objRef = (IObjectReference) iterator.next();
                StringBuffer buffer = new StringBuffer(" -- ");
                if (objRef.isStale()) {
                    buffer.append("primarily description :: " + objRef.getObjectDescription());
                } else {
                    buffer.append(objRef.get());
                }
                buffer.append("; isStale=").append(objRef.isStale()).
                        append(" ; isWeakReference=").append(objRef.isWeakReference());
                conds[i] = buffer.toString();
            }
        }

        return conds;
    }
1145594
public static Condition attribute(final String attributeName) {
    return new Condition("attribute") {
      @Override
      public boolean apply(Driver driver, WebElement element) {
        return element.getAttribute(attributeName) != null;
      }

      @Override
      public String toString() {
        return name + " " + attributeName;
      }
    };
  }
86885
public static Rule conditionsRule(final Condition condition, String key, String value) {
        return conditionsRule(condition, States.state(key, value));
    }
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;
    }
859039
public static Description createSuiteDescription(Class<?> testClass) {
        return new Description(testClass, testClass.getName(), testClass.getAnnotations());
    }
942767
public RolloutGroupConditionBuilder successCondition(final RolloutGroupSuccessCondition condition,
            final String expression) {
        conditions.setSuccessCondition(condition);
        conditions.setSuccessConditionExp(expression);
        return this;
    }
428615
public int delObjByCondition(String tableName, String condition) {
		//String tableName=changeTableNameCase(otableName);
		//JdbcTemplate jdbcTemplate = (JdbcTemplate) MicroDbHolder.getDbSource(dbName);
		JdbcTemplate jdbcTemplate =getMicroJdbcTemplate();
		String sql = "delete from " + tableName + " where "+condition;
		logger.debug(sql);
		Integer retStatus=jdbcTemplate.update(sql);
		return retStatus;
	}
461660
public Condition asCondition() {
        Condition condition = new Condition().withComparisonOperator(operator.getComparisonOperator());
        int argumentCount = operator.getArgumentCount();

        if (argumentCount == 1) {
            condition.withAttributeValueList(ConversionUtil.toAttributeValue(values[0]));
        } else if (argumentCount == 2) {
            condition.withAttributeValueList(ConversionUtil.toAttributeValue(values[0]), ConversionUtil.toAttributeValue(values[1]));
        } else if (argumentCount != 0) {    // N arguments
            condition.setAttributeValueList(ConversionUtil.toAttributeValueList(values[0]));
        }

        return condition;
    }
642481
@XmlElementDecl(namespace = "http://www.w3.org/1998/Math/MathML", name = "condition")
    public JAXBElement<ConditionType> createCondition(ConditionType value) {
        return new JAXBElement<ConditionType>(_Condition_QNAME, ConditionType.class, null, value);
    }
618484
protected function createExpression(Condition $condition, $fieldDescriptor)
    {
        $value = $this->getValue($condition);

        // relative date for cases like "within a week" or "within this month"
        if ('between' === $condition->getOperator() && DataTypes::DATETIME_TYPE === $condition->getType()) {
            $this->expressions[] = $this->listBuilder->createBetweenExpression($fieldDescriptor, [$value, new \DateTime()]);
        } else {
            $this->expressions[] = $this->listBuilder->createWhereExpression(
                $fieldDescriptor,
                $value,
                $condition->getOperator()
            );
        }
    }
353407
@CheckResult
    @NonNull
    public static Condition observableCondition(@NonNull Observable<Boolean> observable) {
        return new ObservableCondition(observable);
    }
352503
public Optional<NrqlAlertCondition> create(long policyId, NrqlAlertCondition condition)
    {
        return HTTP.POST(String.format("/v2/alerts_nrql_conditions/policies/%d.json", policyId), condition, NRQL_ALERT_CONDITION);
    }
1361294
public B activationCondition(String conditionExpression) {
    ActivationCondition activationCondition = createInstance(ActivationCondition.class);
    activationCondition.setTextContent(conditionExpression);
    element.setActivationCondition(activationCondition);
    return myself;
  }
75665
public Optional<NrqlAlertCondition> update(NrqlAlertCondition condition)
    {
        return HTTP.PUT(String.format("/v2/alerts_nrql_conditions/%d.json", condition.getId()), condition, NRQL_ALERT_CONDITION);
    }
427629
public Condition<S, D> or(Condition<S, D> condition) {
    Assert.notNull(condition, "condition");
    return Conditions.or(this, condition);
  }
95746
def create_condition(self, 
		service_id, 
		version_number,
		name,
		_type,
		statement,
		priority="10", 
		comment=None):
		""""""
		body = self._formdata({
			"name": name,
			"type": _type,
			"statement": statement,
			"priority": priority,
			"comment": comment,
		}, FastlyCondition.FIELDS)
		content = self._fetch("/service/%s/version/%d/condition" % (service_id, version_number), method="POST", body=body)
		return FastlyCondition(self, content)