jadex.bdi.benchmarks.Counter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jadex-applications-bdi Show documentation
Show all versions of jadex-applications-bdi Show documentation
The Jadex BDI applications package contain
several example applications, benchmarks and
testcases using BDI agents.
package jadex.bdi.benchmarks;
/**
* A thread safe counter to determine when all agents are running.
*/
public class Counter
{
//-------- attributes --------
/** The counter. */
protected int cnt = 0;
//-------- constructors --------
/**
* Increment and return the counter value.
*/
public synchronized int increment()
{
return ++cnt;
}
}