Create a description for an EventCondition object.

@param condition the condition
@return a description to be used on email templates
436929
public String events(EventCondition condition) {
        String description = "event on: " + condition.getDataId();
        if (condition.getExpression() != null) {
            description += " [" + condition.getExpression() + "]";
        }
        return description;
    }
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;
    }
977635
void ensureCondition(boolean condition, String messageFormat, Object... args) throws SerializationException {
        if (!condition) {
            throw new SerializationException(String.format(messageFormat, args));
        }
    }
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);
    }
340820
public Client createWithEmailAndDescription( String email, String description ) {
    ParameterMap<String, String> params = new ParameterMap<String, String>();
    if( StringUtils.isNotBlank( email ) )
      params.add( "email", email );
    if( StringUtils.isNotBlank( description ) )
      params.add( "description", description );

    return RestfulUtils.create( ClientService.PATH, params, Client.class, super.httpClient );
  }
783713
public static Stream<String> propertiesReferenced( ICondition condition)
    {
    if( condition == null)
      {
      return Stream.empty();
      }
    
    PropertyVisitor propertyVisitor = new PropertyVisitor();
    condition.accept( propertyVisitor);
    return propertyVisitor.propertiesVisited();
    }
391784
public static <S, T extends Event> InputMapTemplate<S, T> unless(
            Predicate<? super S> condition, InputMapTemplate<S, T> imt) {
        return when(condition.negate(), imt);
    }
1322901
public final boolean verifyEventCondition(MessageEnvelope envelope) {
		String message = safeGetQuickReplyPayload(envelope);
		return expectedPattern.matcher(message).matches();
	}
711056
public void addCondition(String fragment, Object... params) {

        m_conditions.add(new CmsSimpleQueryFragment(fragment, params));
    }
1047533
private void createConditionEditor(Composite parent) throws CoreException
	{
		IVdmLineBreakpoint breakpoint = (IVdmLineBreakpoint) getBreakpoint();
		String label = null;
		// if (BreakpointUtils.getType(breakpoint) != null) {
		// IBindingService bindingService =
		// (IBindingService)PlatformUI.getWorkbench().getAdapter(IBindingService.class);
		// if(bindingService != null) {
		// TriggerSequence keyBinding =
		// bindingService.getBestActiveBindingFor(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
		// if (keyBinding != null) {
		// label = MessageFormat.format("messageFormat", new String[] {keyBinding.format()});
		// }
		// }
		// }
		if (label == null)
		{
			label = "Enable Condition";
		}

		Composite conditionComposite = SWTFactory.createGroup(parent, EMPTY_STRING, 1, 1, GridData.FILL_BOTH);
		fEnableConditionButton = createCheckButton(conditionComposite, label);
		fEnableConditionButton.setSelection(breakpoint.getExpressionState());
		fEnableConditionButton.addSelectionListener(new SelectionAdapter()
		{
			public void widgetSelected(SelectionEvent e)
			{
				setConditionEnabled(fEnableConditionButton.getSelection());
			}
		});
		fConditionEditor = new BreakpointConditionEditor(conditionComposite, this);
		fSuspendWhenLabel = createLabel(conditionComposite, "Suspend when:");
		fConditionIsTrue = createRadioButton(conditionComposite, "condition is 'true'");
		fConditionHasChanged = createRadioButton(conditionComposite, "value of condition changes");
		// if (breakpoint.isConditionSuspendOnTrue()) {
		// fConditionIsTrue.setSelection(true);
		// }
		// else {
		fConditionHasChanged.setSelection(true);
		// }
		setConditionEnabled(fEnableConditionButton.getSelection());
	}
1343488
public static org.fcrepo.server.types.gen.Condition convertConditionToGenCondition(Condition condition) {
        String opAbbr = condition.getOperator().getAbbreviation();

        ComparisonOperator compOperator;
        try {
            compOperator = ComparisonOperator.fromValue(opAbbr);
        } catch (IllegalArgumentException e) {
            throw new IllegalArgumentException("unrecognized comparison operator string: '"
                    + opAbbr + "'");
        }
        org.fcrepo.server.types.gen.Condition cond = new org.fcrepo.server.types.gen.Condition();
        cond.setProperty(condition.getProperty());
        cond.setOperator(compOperator);
        cond.setValue(condition.getValue());
        return cond;
    }
75665
public Optional<NrqlAlertCondition> update(NrqlAlertCondition condition)
    {
        return HTTP.PUT(String.format("/v2/alerts_nrql_conditions/%d.json", condition.getId()), condition, NRQL_ALERT_CONDITION);
    }
920466
private BeanDefinition parseActionCondition(Element element, ParserContext parserContext) {
        Map<String, BeanDefinitionParser> actionRegistry = TestActionRegistry.getRegisteredActionParser();

        Element action = DOMUtil.getFirstChildElement(element);
        if (action != null) {
            BeanDefinitionParser parser = actionRegistry.get(action.getTagName());

            if (parser !=  null) {
                return parser.parse(action, parserContext);
            } else {
                return parserContext.getReaderContext().getNamespaceHandlerResolver().resolve(action.getNamespaceURI()).parse(action, parserContext);
            }
        }

        throw new BeanCreationException("Invalid wait for action condition - action not set properly");
    }
1163662
public <T> ExpectedCondition<T> getConditionIgnoringStaleElement(final ExpectedCondition<T> condition) {
        return d -> {
            try {
                return condition.apply(webDriver);
            } catch (WebDriverException e) {
                if (isStaleElementException(e)) {
                    return null;
                } else {
                    throw e;
                }
            }
        };
    }
717223
public Optional<PluginsAlertCondition> update(PluginsAlertCondition condition)
    {
        return HTTP.PUT(String.format("/v2/alerts_plugins_conditions/%d.json", condition.getId()), condition, PLUGINS_ALERT_CONDITION);
    }
625859
private void toStringCondition(final StringBuilder sb) {
        if (getConditionLiterals().size() > 0) {
            toStringList(sb, getConditionLiterals(), "conditionLiterals");
        }
        if (getConditionRanges().size() > 0) {
            toStringList(sb, getConditionRanges(), "conditionRanges");
        }

    }
1148252
public Optional<ExternalServiceAlertCondition> update(ExternalServiceAlertCondition condition)
    {
        return HTTP.PUT(String.format("/v2/alerts_external_service_conditions/%d.json", condition.getId()), condition, EXTERNAL_SERVICE_ALERT_CONDITION);
    }