Adds a new argument rule with the specified name and returns it.

@param argumentName the argument name
@return the argument item rule
552334
public ItemRule newArgumentItemRule(String argumentName) {
        ItemRule itemRule = new ItemRule();
        itemRule.setName(argumentName);
        addArgumentItemRule(itemRule);
        return itemRule;
    }
243489
public ItemRule putItemRule(ItemRule itemRule) {
        if (itemRule.isAutoNamed()) {
            autoNaming(itemRule);
        }
        return put(itemRule.getName(), itemRule);
    }
723314
private void addArgument(CliArgumentContainer argumentContainer) {

    this.arguments.add(argumentContainer);
    String modeId = argumentContainer.getArgument().mode();
    requireMode(modeId, argumentContainer);
  }
831975
public static Name getArgumentAsName(Object arg) {
        if (arg instanceof String) {
            return LdapUtils.newLdapName((String) arg);
        } else if (arg instanceof Name) {
            return (Name) arg;
        } else {
            throw new IllegalArgumentException(
                    "First argument needs to be a Name or a String representation thereof");
        }
    }
14606
public PiecewiseFunction addPiecewiseFunction(String name, String argumentName) {
		return addFunction(new PiecewiseFunction(name, argumentName));
	}
1282292
public void add(final String arg) {
        if (arg != null) {
            final Argument argument = parse(arg);
            add(argument);
        }
    }
78124
public static void contains( Collection<?> argument,
                                 Object value,
                                 String name ) {
        isNotNull(argument, name);
        if (!argument.contains(value)) {
            throw new IllegalArgumentException(CommonI18n.argumentDidNotContainObject.text(name, getObjectName(value)));
        }
    }
642309
public void add(String name, MessageArg arg) {
    args.add(arg);
    if (map == null) {
      map = new HashMap<>();
    }
    map.put(name, arg);
  }
640104
def find_arg(self, name):
        """"""
        name = self.normalize_name(name)
        return self.args.get(name)
1344729
public static String getProperty(ArgumentUnit argumentUnit, String propertyName)
    {
        Properties properties = ArgumentUnitUtils.getProperties(argumentUnit);
        return (String) properties.get(propertyName);
    }
535680
public CliCommandBuilder addCliArgument(final String arg) {
        if (arg != null) {
            final Argument argument = Arguments.parse(arg);
            final CliArgument cliArgument = CliArgument.find(argument.getKey());
            if (cliArgument != null) {
                // Remove the alternate key if required
                if (cliArgument.altKey != null) {
                    cliArgs.remove(cliArgument.altKey);
                }
            }
            cliArgs.set(argument);
        }
        return this;
    }
1269205
public function getArgument($argumentName)
    {
        if (!isset($this->arguments[$argumentName])) {
            throw new \InvalidArgumentException('No argument found with name: ' . $argumentName, 1403562449);
        }

        return $this->arguments[$argumentName];
    }
703193
public void addArgumentItemRule(ItemRule argumentItemRule) {
        if (argumentItemRuleMap == null) {
            argumentItemRuleMap = new ItemRuleMap();
        }
        argumentItemRuleMap.putItemRule(argumentItemRule);
    }
19393
def add_default_argument(self, name, value_type, item_help, default=None):
    
    if value_type not in self.__restricted_default_types:
      raise ArgumentException("Positional(default) argument couldn't have {} type".format(value_type.__name__))

    if self.__is_default_arg_flag_used and default is None:
      raise ArgumentException("After defining first default Positional argument, rest should have default value too".format(value_type.__name__))
    elif default is not None:
      self.__is_default_arg_flag_used = True

      if not isinstance(default, value_type):
        raise ArgumentException("Invalid default type for argument".format(name))

    self._default_args.append(ModuleArgumentItem(name, value_type, item_help, default=default))
    return self
525708
public HiltItemStack setName(String name) {
        createItemMeta();
        ItemMeta itemMeta = getItemMeta();
        itemMeta.setDisplayName(name != null ? name.replace("\\s+", " ") : null);
        setItemMeta(itemMeta);
        return this;
    }
259317
private String getArgumentName(final String arg) {
        int pos = arg.indexOf("=");
        if (pos == -1) {
            pos = arg.indexOf(":");
        }
        return arg.substring(0, pos != -1 ? pos : arg.length());
    }
630990
public CmdLineAction arg(String arg) {
		if (!CmdLineProcessor.isActionArg(arg)) {
			throw new IllegalArgumentException(arg);
		}
		this.args.add(arg);
		return this;
	}