class RunIdIncrementer implements JobParametersIncrementer {

	private static final String RUN_ID_KEY = "run.id";

	private String key = RUN_ID_KEY;

	/**
	 * The name of the run id in the job parameters. Defaults to "run.id".
	 * @param key the key to set
	 */
	public void setKey(String key) {
		this.key = key;
	}

	/**
	 * Increment the run.id parameter (starting with 1).
	 * @param parameters the previous job parameters
	 * @return the next job parameters with an incremented (or initialized) run.id
	 * @throws IllegalArgumentException if the previous value of run.id is invalid
	 */
	@Override
	public JobParameters getNext(@Nullable JobParameters parameters) {<FILL_FUNCTION_BODY>}

}


		JobParameters params = (parameters == null) ? new JobParameters() : parameters;
		JobParameter<?> runIdParameter = params.getParameters().get(this.key);
		long id = 1;
		if (runIdParameter != null) {
			try {
				id = Long.parseLong(runIdParameter.getValue().toString()) + 1;
			}
			catch (NumberFormatException exception) {
				throw new IllegalArgumentException("Invalid value for parameter " + this.key, exception);
			}
		}
		return new JobParametersBuilder(params).addLong(this.key, id).toJobParameters();
	
<no_super_class>