Test if array parameter is not null or empty.

@param parameter invocation array parameter,
@param name the name of invocation parameter.
@throws IllegalArgumentException if <code>parameter</code> array is null or empty.
551367
public static void notNullOrEmpty(Object[] parameter, String name) throws IllegalArgumentException {
		if (parameter == null || parameter.length == 0) {
			throw new IllegalArgumentException(name + " parameter is empty.");
		}
	}
1259667
void parameter(String name, Object value) {
        Preconditions.checkNotNull(name, "parameter name cannot be null");
        if (value instanceof Observable)
            throw new IllegalArgumentException(
                    "use parameters() method not the parameter() method for an Observable");
        this.parameters = parameters.concatWith(Observable.just(new Parameter(name, value)));
    }
1331690
@Override
    public String getParameter(String name) {
        String[] vals = getParameterMap().get(name);

        return (vals != null && vals.length > 0) ? vals[0] : null;
    }
635479
@Override
  public boolean isOptionalParameter(Node parameter) {
    return super.isOptionalParameter(parameter)
        || (parameter.isName() && parameter.getString().startsWith(OPTIONAL_ARG_PREFIX));
  }
222270
public boolean hasParameter(String parameter) {
    if (info == null || info.parameters == null) {
      return false;
    }
    return info.parameters.containsKey(parameter);
  }
76900
public static <T> T[] checkNonEmpty(T[] array, String name) {
        checkNotNull(array, name);
        checkPositive(array.length, name + ".length");
        return array;
    }
861906
public final boolean hasAnnotation(final String name) {
        if (name == null) {
            throw new IllegalArgumentException("The argument 'name' cannot be NULL!");
        }
        for (int i = 0; i < annotations.size(); i++) {
            final SgAnnotation annotation = annotations.get(i);
            if (annotation.getName().equals(name)) {
                return true;
            }
        }
        return false;
    }
244636
public static void notNull(@Nullable Object value, String name) {
        if (value == null) {
            throw new IllegalArgumentException(name + " must not be null!");
        }
    }
524027
public String getParameter(String name) {

        String[] p = getParameterMap().get(name);
        if (p != null) {
            return p[0];
        }

        return null;
    }
108602
static void checkInternalName(final String name, final String msg) {
        if (name == null || name.length() == 0) {
            throw new IllegalArgumentException("Invalid " + msg
                    + " (must not be null or empty)");
        }
        if (name.charAt(0) == '[') {
            checkDesc(name, false);
        } else {
            checkInternalName(name, 0, -1, msg);
        }
    }
49661
public void removeParameter(String name) {
		if(name == null) {
			throw new NullPointerException("parameter name is null ! ");
		}
		if(isModifiable == ModifiableRule.NotModifiable) {
			throw new IllegalStateException("it is forbidden to modify the parameters");
		}
		if(name.equalsIgnoreCase("tag") && (isModifiable == ModifiableRule.From || isModifiable == ModifiableRule.To)) {
			throw new IllegalStateException("it is forbidden to remove the tag parameter on To or From Header");
		}
		if(name.equalsIgnoreCase("branch") && isModifiable == ModifiableRule.Via) {
			throw new IllegalStateException("it is forbidden to set the branch parameter on the Via Header");
		}
		this.parameters.remove(name);
		if(header != null) {
			header.removeParameter(name);
		}
	}
154328
public List/*< String >*/ getParameters( String name )
    {
        if ( _parameters == null || !_parameters.hasParameters())
            return Collections.EMPTY_LIST;
        else {

            List parameters = _parameters.getParameterValues(name);
            if(parameters == null)
                return Collections.EMPTY_LIST;
            else return Collections.unmodifiableList(parameters);
        }
    }
1004540
public static void notEmpty(Object[] arr, String name) {
    notNull(arr, name);

    if (arr.length == 0) {
      throw new IllegalArgumentException(name + "must not be empty");
    }
  }
726179
public void removeParameter( String name )
    {
        if (_parameters == null || !_parameters.hasParameters())
            return;

        _parameters.removeParameter(name);
    }
321717
protected void assertArrayHasLengthAndAllElementsNotNull(final Object[] array, final Integer length) throws ArgumentCountException, ArgumentNullException {

		if (array.length != length) {
			throw ArgumentCountException.notEqual(array.length, length);
		}

		for (final Object element : array) {

			if (element == null) {
				throw new ArgumentNullException();
			}
		}
	}
1301670
public static String checkNonEmptyString(final String string, final String name) throws IllegalArgumentException {
    if (string == null || string.isEmpty()) {
      throw new IllegalArgumentException("Expecting a non-empty string for " + name);
    }
    return string;
  }
510045
public static void size(Map<?, ?> parameter, int size, String name) throws IllegalArgumentException {
		if (parameter.size() != size) {
			throw new IllegalArgumentException(String.format("%s size is not %d.", name, size));
		}
	}