123456789101112131415161718192021222324252627282930 |
- package ui.model;
- public class idCounterElem {
- private static int counter = 1;
- public static synchronized int nextId() {
- return counter++;
- }
- /**
- * @return the counter
- */
- public static int getCounter() {
- return counter;
- }
- /**
- * @param counter
- * the counter to set
- */
- public static void setCounter(int counter) {
- idCounterElem.counter = counter;
- }
- public static void resetCounter() {
- counter = 1;
- }
- }
|