package fr.lteconsulting.hexa.client.tools;

/*
 * This class is useful when wanting to wait for multiple callbacks
 */

public abstract class CallCounter
{
	protected abstract void onFinish();

	private int count = 0;

	public void add()
	{
		count++;
	}

	public void rem()
	{
		count--;

		if( count == 0 )
			onFinish();
	}

	public void reset()
	{
		count = 0;
	}
}

@@ -362,10 +362,54 @@
 = 0;%0A%09%7D%0A
+%09%0A%09public int count()%0A%09%7B%0A%09%09return count;%0A%09%7D%0A
 %7D%0A

Call Counter : count()