com.greenpepper.confluence.utils.MacroCounter Maven / Gradle / Ivy
package com.greenpepper.confluence.utils;
/**
* MacroCounter class.
*
* @author oaouattara
* @version $Id: $Id
*/
public class MacroCounter
{
private static MacroCounter labelCounter = new MacroCounter();
private static int counter = 0;
private MacroCounter(){}
/**
* instance.
*
* @return a {@link com.greenpepper.confluence.utils.MacroCounter} object.
*/
public static MacroCounter instance() { return labelCounter; }
/**
* getNextCount.
*
* @return a int.
*/
public synchronized int getNextCount()
{
if(counter > 999)
{
counter = 0;
}
return counter++;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy