Adds an argumentto a list of arguments by skipping null or empty arguments.

@param arguments list to which the arguments should be added
@param argument  argument to be added (can be null or empty)
765956
private void add( final List<String> arguments,
                      final String argument )
    {
        if( argument != null && argument.trim().length() > 0 )
        {
            arguments.add( argument );
        }
    }
914116
public void set(final Argument argument) {
        if (argument != null) {
            map.put(argument.getKey(), Collections.singleton(argument));
        }
    }
1312951
public static void logCommandLineArguments( String[] args ) {
		if( args == null || args.length < 1 ) return;
		for( int i=0; i < args.length; i++ ) {
			logMessage("Cmd line arg["+i+"]="+args[i]);
		}
	}
1148458
public void add(final Param key, final String[] value) {
        if (value != null && value.length > 0) {
            parameters.put(key, toList(value));
        }
    }
924668
protected void parseArguments(String[] arguments) {
        LinkedList<String> args = new LinkedList<String>(Arrays.asList(arguments));

        boolean valid = true;
        while (!args.isEmpty()) {
            String arg = args.removeFirst();

            boolean handled = false;
            for (Option option : options) {
                if (option.processOption(arg, args)) {
                    handled = true;
                    break;
                }
            }
            if (!handled) {
                System.out.println("Unknown option: " + arg);
                System.out.println();
                valid = false;
                break;
            }
        }
        if (!valid) {
            showOptions();
            completed();
        }
    }
356173
protected void addStep(String methodName, Object[] args) {
    	if(StringUtils.isBlank(methodName)) {
        	throw new IllegalArgumentException("methodName cannot be null or empty.");
        }
    	addStep(methodName, args, false);
    }
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;
    }
642309
public void add(String name, MessageArg arg) {
    args.add(arg);
    if (map == null) {
      map = new HashMap<>();
    }
    map.put(name, arg);
  }
902268
private void add( final List<String> arguments,
                      final Collection<String> argumentsToAdd )
    {
        if( argumentsToAdd != null && argumentsToAdd.size() > 0 )
        {
            arguments.addAll( argumentsToAdd );
        }
    }
682875
public void setArgs(java.util.Collection<CodeGenNodeArg> args) {
        if (args == null) {
            this.args = null;
            return;
        }

        this.args = new java.util.ArrayList<CodeGenNodeArg>(args);
    }
261100
private static Object[] getParams(Context context, Object... arguments)
    {
        final Collection<Object> params = new ArrayList<>(1);
        params.add(context);
        params.addAll(Arrays.asList(arguments));
        return params.toArray();
    }
917361
private boolean containsNull(Object[] arguments) {
        for (Object argument : arguments) {
            if (argument == null) {
                return true;
            }
        }
        return false;
    }
254109
public static <E> void notNullOrEmpty(final Collection<E> argument, final String name) {
    if (argument == null) {
      s_logger.error("Argument {} was null", name);
      throw new QuandlRuntimeException("Value " + name + " was null");
    } else if (argument.size() == 0) {
      s_logger.error("Argument {} was empty collection", name);
      throw new QuandlRuntimeException("Value " + name + " was empty collection");
    }
  }
342978
@NonNull
    public static List<String> unmodifiableNonNullListOfStrings(@Nullable List<?> args) {
        if (args == null || args.isEmpty()) {
            return emptyList();
        } else {
            final List<String> list = new ArrayList<String>(args.size());

            for (Object arg : args) {
                list.add(arg != null ? arg.toString() : "null");
            }

            return unmodifiableList(list);
        }
    }
725353
def add_argument(self, *args, **kwargs):
        

        if len(args) == 1 and isinstance(args[0], self.argument_class):
            self.args.append(args[0])
        else:
            self.args.append(self.argument_class(*args, **kwargs))

        # Do not know what other argument classes are out there
        if self.trim and self.argument_class is Argument:
            # enable trim for appended element
            self.args[-1].trim = kwargs.get('trim', self.trim)

        return self
209153
public static <T extends CharSequence> T checkArgNotNullOrEmpty(final T arg, final String argNameOrErrorMsg) {
        if (N.isNullOrEmpty(arg)) {
            if (argNameOrErrorMsg.indexOf(' ') == N.INDEX_NOT_FOUND) {
                throw new IllegalArgumentException("'" + argNameOrErrorMsg + "' can not be null or empty");
            } else {
                throw new IllegalArgumentException(argNameOrErrorMsg);
            }
        }

        return arg;
    }
1110966
public static void notEmpty(final String arg, final String name) {
        if(arg == null) {
            throw new NullPointerException(String.format("%s should not be null.", name));
        }
        
        if(arg.isEmpty()) {
            throw new IllegalArgumentException(String.format("%s should not be empty.", name));
        }
    }