All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.craft.atom.test.CaseCounter Maven / Gradle / Ivy

There is a newer version: 3.1.2
Show newest version
package io.craft.atom.test;

import java.text.DecimalFormat;
import java.util.concurrent.atomic.AtomicInteger;

/**
 * Test case counter.
 * 
 * @author mindwind
 * @version 1.0, Sep 26, 2013
 */
public class CaseCounter {
	
	
	private static final AtomicInteger counter = new AtomicInteger(0);
	
	
	public static String incr(int delta) {
		String format = "00000";
		DecimalFormat df = new DecimalFormat(format);
		long c = counter.addAndGet(delta);
		return df.format(c);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy