{@inheritDoc}

@throws IllegalArgumentException {@inheritDoc}
3366
@Override
  public void validateUpdate(ResourcePool newPool) {
    // Replacement must be of the same ResourceType
    if (!this.getType().equals(newPool.getType())) {
      throw new IllegalArgumentException("ResourceType " + newPool.getType() + " can not replace " + this.getType());
    }
    // Replacement must have the same persistence
    if (this.isPersistent() != newPool.isPersistent()) {
      throw new IllegalArgumentException("ResourcePool for " + newPool.getType() + " with isPersistent="
          + newPool.isPersistent() + " can not replace isPersistent=" + this.isPersistent());
    }
  }
674036
public void addInterface(Class<?> newInterface) {
        if (!newInterface.isInterface()) {
            throw new IllegalArgumentException(newInterface + " is not an interface");
        }
        additionalInterfaces.add(newInterface);
    }
939219
public static void exactlyOnePresentOrIllegalArgument(final Optional<?> x,
      final Optional<?> y, final String msg) {
    if (x.isPresent() == y.isPresent()) {
      throw new IllegalArgumentException(msg);
    }
  }
561108
private static void checkArguments(JSONObject jsonObject, String key) throws JSONException {
		if (key == null) {
			throw new IllegalArgumentException("Can't go searching for a null key.");
		}
		if (jsonObject == null) {
			throw new JSONException("Can't search for key '" + key + "' in a null object.");
		}
		if (!jsonObject.containsKey(key)) {
			throw new JSONException("Key '" + key + "' could not be found.");
		}
		// Please, proceed...
	}
1248140
public function setMethodArgument($argumentName, $argumentValue): void
    {
        if (!array_key_exists($argumentName, $this->methodArguments)) {
            throw new InvalidArgumentException('The argument "' . $argumentName . '" does not exist in method ' . $this->className . '->' . $this->methodName, 1309260269);
        }
        $this->methodArguments[$argumentName] = $argumentValue;
    }
1130393
public static void checkArgument(boolean b, String errorMessageTemplate, double p) {
        if (!b) {
            throw new IllegalArgumentException(format(errorMessageTemplate, p));
        }
    }
39231
public static void checkArgument(boolean b, @Nullable String errorMessageTemplate, char p1) {
    if (!b) {
      throw new IllegalArgumentException(format(errorMessageTemplate, p1));
    }
  }
1115720
public function execute()
    {
        $length = mb_strlen($this->getValue());

        if (filter_var($this->numberToTruncate, FILTER_VALIDATE_INT) === false) {
            throw new \InvalidArgumentException("Value to truncate by is not a number");
        } elseif (filter_var($this->numberToTruncate, FILTER_VALIDATE_INT, array(
            "options" => array(
                "min_range" => 0,
                "max_range" => $length
            )
        )) === false) {
            throw new \InvalidArgumentException("Value to truncate by is out of bounds");
        } else {
            return (new SubString($this->getValue(), 0, $length - $this->numberToTruncate))->execute();
        }
    }
182787
public void setTotal(int total) throws IllegalArgumentException {
    if(getProcessed() > total) {
      throw new IllegalArgumentException(getProcessed() + " exceeds total: " + total);
    }
    this.total = total;
  }
96678
public void setValue(List<Tag> value) throws IllegalArgumentException {
        this.type = null;
        this.value.clear();

        for(Tag tag : value) {
            this.add(tag);
        }
    }
133547
Object convertArgument(String arg, Type paramType) throws IllegalArgumentException {
		Object result = null;
		if (null == arg || "null".equals(arg)) {
			return result;
		}
		logger.debug("Try to convert {} : param = {} : {}", new Object[]{arg, paramType, paramType.getClass()});
		try { // GenericArrayType, ParameterizedType, TypeVariable<D>, WildcardType, Class
			if (ParameterizedType.class.isInstance(paramType)) {
				JavaType javaType = getJavaType(paramType);
				logger.debug("Try to convert '{}' to JavaType : '{}'", arg, paramType);
				result = getObjectMapper().readValue(arg, javaType);
				logger.debug("Conversion of '{}' to '{}' : OK", arg, paramType);
			} else if (Class.class.isInstance(paramType)) {
				Class cls = (Class) paramType;
				logger.debug("Try to convert '{}' to Class '{}'", arg, paramType);
				checkStringArgument(cls, arg);
				result = getObjectMapper().readValue(arg, cls);
				logger.debug("Conversion of '{}' to '{}' : OK", arg, paramType);
			} else { // GenericArrayType, TypeVariable<D>, WildcardType
				logger.warn("Conversion of '{}' to '{}' not yet supported", arg, paramType);
			}
		} catch (IOException ex) {
			logger.debug("Conversion of '{}' to '{}' failed", arg, paramType);
			throw new IllegalArgumentException(paramType.toString());
		}
		return result;
	}
681915
synchronized public void addAppender(Appender appender) throws IllegalArgumentException {
        if (appender == null) {
            throw new IllegalArgumentException("Appender not allowed to be null");
        }

        for (Appender p : appenderList) {
            if (p.getClass() == appender.getClass())
                return;
        }
        appenderList.add(appender);
    }
191364
void parameter(Object value) {
        // TODO check on supported types?
        if (value instanceof Observable)
            throw new IllegalArgumentException(
                    "use parameters() method not the parameter() method for an Observable");
        parameters(Observable.just(value));
    }
852341
public void done(T response) throws IllegalArgumentException {
        lock.lock();
        try {
            if (response != null) {
                this.response = response;
                condition.signal();
            } else {
                throw new IllegalArgumentException("response cannot be null");
            }
        } finally {
            lock.unlock();
        }
    }
630990
public CmdLineAction arg(String arg) {
		if (!CmdLineProcessor.isActionArg(arg)) {
			throw new IllegalArgumentException(arg);
		}
		this.args.add(arg);
		return this;
	}
980734
public static void illegalCode(Exception e, String methodName, String className){
		throw new IllegalCodeException(MSG.INSTANCE.message(nullPointer,methodName,className,e.getClass().getSimpleName(),""+e.getMessage()));
	}
990631
public static void notNull(final Object arg, final String name) {
        if(arg == null) {
            throw new IllegalArgumentException(String.format("%s should not be null.", name));
        }
    }