Returns the lower bound expression of the action with given `name`.
324022
def _extract_lower_bound(self, name: str, expr: Expression) -> Optional[Expression]:
        ''''''
        etype = expr.etype
        args = expr.args
        if etype[1] in ['<=', '<']:
            if args[1].is_pvariable_expression() and args[1].name == name:
                return args[0]
        elif etype[1] in ['>=', '>']:
            if args[0].is_pvariable_expression() and args[0].name == name:
                return args[1]
        return None
722354
def get_expression_engine(self, name):
        """"""
        try:
            return self.expression_engines[name]
        except KeyError:
            raise InvalidEngineError("Unsupported expression engine: {}".format(name))
763011
private static String getActionString(int action) {

        switch (action) {

            case Constraint.RESTRICT :
                return Tokens.T_RESTRICT;

            case Constraint.CASCADE :
                return Tokens.T_CASCADE;

            case Constraint.SET_DEFAULT :
                return Tokens.T_SET + ' ' + Tokens.T_DEFAULT;

            case Constraint.SET_NULL :
                return Tokens.T_SET + ' ' + Tokens.T_NULL;

            default :
                return Tokens.T_NO + ' ' + Tokens.T_ACTION;
        }
    }
1128389
@Override
    public <X extends Comparable<? super X>> Expression<X> least(Expression<X> arg0)
    {
        // TODO Auto-generated method stub
        return null;
    }
139231
public StringExpression lower() {
        if (lower == null) {
            lower = Expressions.stringOperation(Ops.LOWER, mixin);
        }
        return lower;
    }
733237
function(name, action) {

        var handlers = this.__handlers__ || (this.__handlers__={});

        if (!action) {
            handlers[name] = [];
            return;
        }
        if (handlers[name]) {
            var hdls = handlers[name];
            var retains = [];
            for (var i = 0; i < hdls.length; i++) {
                if (action && hdls[i].action !== action) {
                    retains.push(hdls[i]);
                }
            }
            handlers[name] = retains;
        }

        return this;
    }
833963
public String getParameter(String name) {
    return parameters.get(name.toLowerCase(Locale.US));
  }
316429
@Check(CheckType.FAST)
	public void checkActionName(SarlAction action) {
		final JvmOperation inferredType = this.associations.getDirectlyInferredOperation(action);
		final QualifiedName name = QualifiedName.create(inferredType.getQualifiedName('.').split("\\.")); //$NON-NLS-1$
		if (this.featureNames.isDisallowedName(name)) {
			final String validName = Utils.fixHiddenMember(action.getName());
			error(MessageFormat.format(
					Messages.SARLValidator_39,
					action.getName()),
					action,
					XTEND_FUNCTION__NAME,
					ValidationMessageAcceptor.INSIGNIFICANT_INDEX,
					INVALID_MEMBER_NAME,
					validName);
		} else if (!isIgnored(DISCOURAGED_FUNCTION_NAME)
				&& this.featureNames.isDiscouragedName(name)) {
			warning(MessageFormat.format(
					Messages.SARLValidator_39,
					action.getName()),
					action,
					XTEND_FUNCTION__NAME,
					ValidationMessageAcceptor.INSIGNIFICANT_INDEX,
					DISCOURAGED_FUNCTION_NAME);
		}
	}
964592
public static Action getActionByName(Entity entity, String name) {
        if(entity == null) {
            throw new IllegalArgumentException("entity cannot be null.");
        }
        if(StringUtils.isBlank(name)) {
            throw new IllegalArgumentException("name cannot be null or empty.");
        }
        List<Action> actions = entity.getActions();
        if (actions == null)
            return null;
        Action action = null;
        for (Action a : actions) {
            if (a.getName().equals(name)) {
                action = a;
                break;
            }
        }
        return action;
    }
444939
def get_momentum_by_name(self, name):
        
        if name is None:
            raise TypeError('\'name\' should not be None')
        for momentum in self.momenta:
            if momentum.name == name:
                return momentum
        raise KeyError('No such momentum named {0}'.format(name))
916228
def get_nln_constraint(self, name):
        
        for c in self.nln_constraints:
            if c.name == name:
                return c
        else:
            raise ValueError
448036
public function findActionByName(string $name)
    {
        foreach ($this->actions as $action) {
            if ($action->getAction() === $name) {
                return $action;
            }
        }

        return null;
    }
51600
private static Name checkNotReserved(Name name, String action) {
    if (isReserved(name)) {
      throw new IllegalArgumentException("cannot " + action + ": " + name);
    }
    return name;
  }
886259
function getConstraintRelId(constraintsNode, name) {
            var relIds = innerCore.getChildrenRelids(constraintsNode);
            var relId;
            for (var i = 0; i < relIds.length; i++) {
                if (name === innerCore.getAttribute(innerCore.getChild(constraintsNode, relIds[i]), 'name')) {
                    relId = relIds[i];
                    break;
                }
            }
            return relId;
        }
384760
def _build_action_bound_constraints_table(self):
        ''''''
        self.action_lower_bound_constraints = {}
        self.action_upper_bound_constraints = {}

        for name, preconds in self.local_action_preconditions.items():

            for precond in preconds:
                expr_type = precond.etype
                expr_args = precond.args

                bounds_expr = None

                if expr_type == ('aggregation', 'forall'):
                    inner_expr = expr_args[1]
                    if inner_expr.etype[0] == 'relational':
                        bounds_expr = inner_expr
                elif expr_type[0] == 'relational':
                    bounds_expr = precond

                if bounds_expr:
                    # lower bound
                    bound = self._extract_lower_bound(name, bounds_expr)
                    if bound is not None:
                        self.action_lower_bound_constraints[name] = bound
                    else: # upper bound
                        bound = self._extract_upper_bound(name, bounds_expr)
                        if bound is not None:
                            self.action_upper_bound_constraints[name] = bound
702875
def get(self, name: str, default: Any = None) -> Any:
        """"""
        return super().get(name, [default])[0]
402910
public function action($name = null)
    {
        if (empty($name)) {
            $name = $this->_action;
        }

        $name = Inflector::variable($name);

        return $this->_loadAction($name);
    }