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

com.greenpepper.confluence.utils.MacroCounter Maven / Gradle / Ivy

There is a newer version: 4.2.4
Show newest version
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