1234567891011121314151617181920212223242526 |
- 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;
- }
- }
|